Some Ubuntu Linux Setup Notes

Basic Ubuntu Linux setup notes/steps

"Login" as root

APT Update / Upgrade

Network Related

Time Zone

NodeJS

nginx

Python

Bubblewrap

File Watcher Limits


"Login" as root

sudo -i

APT Update / Upgrade

apt update
apt upgrade
apt dist-upgrade

IP Address Information

ip a
netplan status

Configure Network / IP Address

Create / Update a .yaml file in /etc/netplan/ folder. By convention, start the filename with a 2-digit number, followed by a dash.

For example, the file 01-static.yaml with the following contents configures a static IP address on Ubuntu Server (which uses the renderer: networkd to denote the server's networking subsystem).

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: no
      addresses:
        - 192.168.100.101/24
      routes:
        - to: default
          via: 192.168.100.254
      nameservers:
        addresses: [8.8.8.8, 8.8.8.4]

Here's another example for a file named 02-dynamic.yaml that configures a dynamic IP address on Ubuntu Desktop (which uses a different renderer: NetworkManager used by the desktop's networking subsystem).

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    eth1:
      dhcp4: true

Secure Files

chmod 600 01-static.yaml
chmod 600 02-dynamic.yaml

Apply Configuration

Safely apply the configuration.

netplan try

Or if you are confident, then just apply.

netplan apply

Time Zone

timedatectl set-timezone Asia/Singapore

NodeJS

apt install nodejs

Another method is via NVM.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/refs/heads/master/install.sh | bash
source ~/.bashrc
nvm install --lts  # Install the latest LTS version
nvm install 25.8.0  # Install the specific version 25.8.0

nginx

apt install nginx

Python

Base Python3

apt install python3

Useful modules

apt install python3-pip
apt install python3-venv

Bubblewrap

For relaxing security permissions for bubblewrap / bwrap in required scenarios, like allow autonomous agents to execute user-allowed commands.

apt install apparmor-profiles
apt install apparmor-profile-extra

sudo ln -s /usr/share/apparmor/extra-profiles/bwrap-userns-restrict /etc/apparmor.d/
sudo apparmor_parser /etc/apparmor.d/bwrap-userns-restrict

File Watcher Limits

Typical default values are:

fs.inotify.max_user_watches = 8192
fs.inotify.max_user_instances = 128

Recommended values for development environments are:

fs.inotify.max_user_watches = 524288
fs.inotify.max_user_instances = 1024

Setup commands:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
echo fs.inotify.max_user_instances=1024 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p