🧠 DevOps Command & Keyword Cheat Sheet


📦 Package Management (Ubuntu/Debian)

Command Meaning
apt Advanced Package Tool – installs, updates, removes packages
apt update Updates the package list from repositories
apt upgrade Installs available updates for installed packages
apt install <package> Installs a new package
apt remove <package> Removes an installed package
dpkg -i Installs a .deb file manually

🧑‍💻 User Management

Command Meaning
adduser <username> Adds a new user (friendly version)
useradd <username> Adds a user (low-level command)
passwd <username> Sets or changes password for a user
usermod -aG sudo <username> Adds user to sudo group (admin access)
id <username> Shows UID, GID, and groups of a user
who / w Shows who is logged in

🔐 Permissions & Ownership

Command Meaning
chmod Changes file permissions (rwx)
chown Changes file owner or group
ls -l Shows permissions and ownership
umask Sets default permissions for new files

🗂️ File System & Navigation

Command Meaning
ls Lists files
cd Changes directory
pwd Shows current directory
cp Copies files or folders
mv Moves or renames files
rm Deletes files or folders
touch Creates an empty file
mkdir Creates a directory
cat Displays file contents
nano / vi Terminal-based text editors

📂 File Search & Processing

Command Meaning
find Finds files by name, type, size, etc.
grep Searches inside files
less / more Scroll through file contents
head / tail Show first or last lines of a file

⚙️ System Management

Command Meaning
top / htop Shows live system processes and resource usage
df -h Shows disk space usage
du -sh <folder> Shows size of a folder
free -h Shows memory usage
uptime Shows how long the system has been running
reboot / shutdown Restarts or shuts down the system