Ubuntu is the modern, open source operating system on Linux for the enterprise server, desktop, cloud, and IoT.
Command Link to heading
SSH into a server using a private key Link to heading
ssh -i private-key username@ip-address
# e.g. ssh -i .ssh/my_private_key [email protected]
Generate an SSH key with a specific name Link to heading
ssh-keygen -f path-to-save/name
# e.g. ssh-keygen -f ~/.ssh/my_private_key
Install Dcoker Link to heading
sudo apt install -y docker.io
Install Dcoker Compose Link to heading
sudo apt install -y docker-compose
Add current logged in user to docker group Link to heading
sudo usermod -aG docker $USER
Get info about the OS Link to heading
uname -a
Get IP address Link to heading
ip addr
Get firewall status Link to heading
sudo ufw status
Allow traffic Link to heading
sudo ufw allow port
# e.g. sudo ufw allow 8080
Enable/Disable firewall Link to heading
sudo ufw enable/disable
Show running processes Link to heading
ps
Display environment variables Link to heading
env
Modify user account Link to heading
usermod -aG <group> <username>
# e.g. sudo usermod -aG docker $USER
Display user identity information Link to heading
id username
# e.g. id admin
Display memory usage Link to heading
free -h
Show disk usage of file systems Link to heading
df -h
apt vs apt-get Link to heading
Both apt and apt-get are package manager.
The apt command is newer and more user-friendly than apt-get.
LTS Releases Link to heading
- Ubuntu 24.04.2 LTS - Noble Numbat
- Ubuntu 22.04.5 LTS - Jammy Jellyfish
- Ubuntu 20.04.6 LTS - Focal Fossa