In the world of DevOps, you’ll spend a significant part of your day inside a terminal — configuring servers, deploying apps, automating tasks. Mastering Linux commands not only saves time but also builds your confidence as you navigate production systems.
This cheat sheet covers essential commands that every DevOps engineer should know, categorized by task.
Basic Navigation & File Operations
Command | Description |
pwd | Print current working directory |
ls -l | List files in long format |
cd /path/to/dir | Change directory |
mkdir dir | Create a new directory |
touch file | Create an empty file |
cp src dest | Copy file or directory |
mv src dest | Move or rename file |
rm file | Remove file |
rm -r dir | Remove directory recursively |
cat file | View file contents |
less file | View large file, page by page |
Permissions & Ownership
Command | Description |
chmod +x file | Make file executable |
chmod 755 file | Change file permissions |
chown user:group file | Change ownership of file |
ls -lh | List with human-readable permissions |
Package Management
Command | Description |
sudo apt update | Update package list |
sudo apt upgrade | Upgrade installed packages |
sudo apt install package | Install a new package |
sudo apt remove package | Remove a package |
sudo apt autoremove | Clean up unused packages |
dpkg -l | List installed packages |
Searching & Finding Files
Command | Description |
find /path -name filename | Find file by name |
grep 'pattern' file | Search for text inside files |
grep -r 'pattern' dir | Recursive search in directory |
locate filename | Find file using locate database |
which command | Show command location in PATH |
awk '/pattern/ { action }' file | Search and process text with pattern matching |
Command | Description |
uname -a | Kernel & OS info |
top | Live system processes |
htop | Advanced process viewer |
df -h | Disk space usage |
du -sh dir | Size of a directory |
free -h | Memory usage |
uptime | How long system has been running |
User Management
Command | Description |
whoami | Current user |
adduser user | Add new user |
passwd user | Change user password |
usermod -aG group user | Add user to group |
deluser user | Delete user |
Networking Essentials
Command | Description |
ip a | Show network interfaces |
ping host | Ping a server |
curl url | Fetch web content |
wget url | Download files |
netstat -tulnp | List listening ports |
ss -tulnp | Modern replacement for netstat |
scp src user@host:/path | Secure copy over SSH |
SSH & Remote Management
Command | Description |
ssh user@host | SSH into a server |
ssh -i key.pem user@host | SSH with private key |
ssh-copy-id user@host | Copy SSH key to server |
rsync -av src dest | Sync files between local and remote |
Must-Know Commands for Git
Command | Description |
git init | Initializes git local repository |
git clone repo_url | Clone a repository |
git status | Check repo status |
git add . | Stage changes |
git commit -m "message" | Commit changes |
git push origin branch | Push to remote |
Must-Know Commands for Docker
Command | Description |
docker ps | List running containers |
docker images | List images |
docker run -it image | Run container interactively |
docker stop container | Stop container |
docker exec -it container bash | Access running container |
When I started with Ubuntu, typing commands felt intimidating — like speaking a foreign language. But with time, I realized these weren’t just commands; they were power tools in my DevOps toolkit.
“Mastering commands isn’t about memorizing them — it’s about knowing what’s possible.”
This cheat sheet is my daily companion — and maybe it’ll become yours too.
#DevOps #Linux #LearnTogether #SoftwareDevelopment #Technology #DevOpsCommunity #bongoDev
Subscribe to my newsletter
Read articles from Shahriar Rashid directly inside your inbox. Subscribe to the newsletter, and don't miss out.