No commands found for your search.

System Information

uname -a
Displays all system information.
hostnamectl
Shows current hostname and related details.
lscpu
Lists CPU architecture information.
timedatectl status
Shows system time.

System Monitoring & Management

top
Displays real-time system processes.
htop
An interactive process viewer. install
df -h
Shows disk usage in human-readable format.
free -m
Displays free and used memory in MB.
kill <pid>
Terminates a process by PID.
<command> &
Runs command in the background.
jobs
Displays background commands.
fg
Brings command to the foreground.

Service Management

sudo systemctl start <svc>
Starts a service.
sudo systemctl stop <svc>
Stops a service.
sudo systemctl status <svc>
Checks the status of a service.
sudo systemctl reload <svc>
Reloads a service's configuration without interrupting operation.
journalctl -f
Follows the journal, showing new log messages in real time.
journalctl -u <unit>
Displays logs for a specific systemd unit.

Cron Jobs & Scheduling

crontab -e
Edits cron jobs for the current user.
crontab -l
Lists cron jobs for the current user.

File Management

ls
Lists files and directories.
touch <file>
Creates an empty file or updates the last accessed date.
cp <src> <dest>
Copies files from source to destination.
mv <src> <dest>
Moves files or renames them.
rm <file>
Deletes a file.

File Permissions & Ownership

chmod [who][+/-][perms] <file>
Changes file permissions.
chmod u+x <file>
Makes a file executable by its owner.
chown <user>:<group> <file>
Changes file owner and group.

Archiving & Compression

tar -czvf <archive.tar.gz> <files>
Compresses files into a tar.gz archive.
tar -xvf <archive> -C <dest>
Extracts a compressed tar archive.

Text Editing & Processing

nano <file>
Opens a file in the Nano text editor.
cat <file>
Displays the contents of a file.
less <file>
Displays paginated content of a file.
head <file>
Shows the first few lines of a file.
tail <file>
Shows the last few lines of a file.
awk '{print}' <file>
Prints every line in a file.

Package Management — APT

sudo apt install <pkg>
Installs a package.
sudo apt install -f --reinstall <pkg>
Reinstalls a broken package.
apt search <query>
Searches for APT packages.
apt-cache policy <pkg>
Lists available package versions.
sudo apt update
Updates package lists.
sudo apt upgrade
Upgrades all upgradable packages.
sudo apt remove <pkg>
Removes a package.
sudo apt purge <pkg>
Removes a package and all its configuration files.

Package Management — Snap

snap find <query>
Search for Snap packages.
sudo snap install <pkg>
Installs a Snap package.
sudo snap remove <pkg>
Removes a Snap package.
sudo snap refresh
Updates all installed Snap packages.
snap list
Lists all installed Snap packages.
snap info <pkg>
Displays information about a Snap package.

Users & Groups

User management
w
Shows which users are logged in.
sudo adduser <user>
Creates a new user.
sudo deluser <user>
Deletes a user.
sudo passwd <user>
Sets or changes the password for a user.
su <user>
Switches user.
sudo passwd -l <user>
Locks a user account.
sudo passwd -u <user>
Unlocks a user password.
sudo chage <user>
Sets user password expiration date.
Group management
id <username>
Displays user and group IDs.
groups <username>
Shows the groups a user belongs to.
sudo addgroup <group>
Creates a new group.
sudo delgroup <group>
Deletes a group.

Networking

Network interfaces
ip addr show
Displays network interfaces and IP addresses.
ip -s link
Shows network statistics.
ss -l
Shows listening sockets.
ping <host>
Pings a host and outputs results.
Netplan configuration
cat /etc/netplan/*.yaml
Displays the current Netplan configuration.
sudo netplan try
Tests a new configuration for a set period of time.
sudo netplan apply
Applies the current Netplan configuration.

Firewall Management

sudo ufw status
Displays the status of the firewall.
sudo ufw enable
Enables the firewall.
sudo ufw disable
Disables the firewall.
sudo ufw allow <port/svc>
Allows traffic on a specific port or service.
sudo ufw deny <port/svc>
Denies traffic on a specific port or service.
sudo ufw delete allow/deny <port>
Deletes an existing allow/deny rule.

SSH & Remote Access

ssh <user>@<host>
Connects to a remote host via SSH.
scp <src> <user>@<host>:<dest>
Securely copies files between hosts.

LXD Containers

Init & create
lxd init
Initializes LXD before first use.
lxc init ubuntu:24.04 <name>
Creates a system container (without starting it).
lxc launch ubuntu:24.04 <name>
Creates and starts a system container.
lxc launch ubuntu:24.04 <name> --vm
Creates and starts a virtual machine.
Manage instances
lxc list
Lists instances.
lxc info <name>
Shows status information about an instance.
lxc start <name>
Starts an instance.
lxc stop <name> [--force]
Stops an instance.
lxc delete <name> [--force]
Deletes an instance.
Access instances
lxc exec <name> -- <cmd>
Runs a command inside an instance.
lxc exec <name> -- bash
Gets shell access to an instance.
lxc console <name>
Gets console access to an instance.
lxc file pull <name>/<path> <dest>
Pulls a file from an instance.
lxc file push <src> <name>/<path>
Pushes a file to an instance.
Projects
lxc project create <name>
Creates a project.
lxc project set <name> <key=val>
Configures a project.
lxc project switch <name>
Switches to a project.

Ubuntu Pro

Activation & status
sudo pro attach <token>
Attaches your machine to Ubuntu Pro using a specific token.
sudo pro status
Displays the status of all Ubuntu Pro services.
sudo pro enable <service>
Enables a specific Ubuntu Pro service.
sudo pro disable <service>
Disables a specific Ubuntu Pro service.
sudo pro refresh
Refreshes the Ubuntu Pro state and latest configuration.
sudo pro detach
Detaches the machine from Ubuntu Pro.
ESM & Livepatch & FIPS
sudo pro enable esm-infra
Activates Extended Security Maintenance for infrastructure packages.
sudo pro enable esm-apps
Activates ESM for applications.
sudo pro enable livepatch
Enables Livepatch — applies critical kernel patches without rebooting.
sudo pro enable fips
Enables FIPS mode, enforcing strict cryptographic standards.