Some Ubuntu Linux Setup Notes
Basic Ubuntu Linux setup notes/steps
Quick Links
"Login" as root
sudo -iAPT Update / Upgrade
apt update
apt upgrade
apt dist-upgradeNetwork Related
IP Address Information
ip a
netplan statusConfigure 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: trueSecure Files
chmod 600 01-static.yaml
chmod 600 02-dynamic.yamlApply Configuration
Safely apply the configuration.
netplan tryOr if you are confident, then just apply.
netplan applyTime Zone
timedatectl set-timezone Asia/SingaporeNodeJS
apt install nodejsAnother 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.0nginx
apt install nginxPython
Base Python3
apt install python3Useful modules
apt install python3-pip
apt install python3-venvBubblewrap
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-restrictFile Watcher Limits
Typical default values are:
fs.inotify.max_user_watches = 8192
fs.inotify.max_user_instances = 128Recommended values for development environments are:
fs.inotify.max_user_watches = 524288
fs.inotify.max_user_instances = 1024Setup 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