Linux Commands Cheat Sheet for DevOps: Master the Terminal on Ubuntu

Shahriar RashidShahriar Rashid
4 min read

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

CommandDescription
pwdPrint current working directory
ls -lList files in long format
cd /path/to/dirChange directory
mkdir dirCreate a new directory
touch fileCreate an empty file
cp src destCopy file or directory
mv src destMove or rename file
rm fileRemove file
rm -r dirRemove directory recursively
cat fileView file contents
less fileView large file, page by page

Permissions & Ownership

CommandDescription
chmod +x fileMake file executable
chmod 755 fileChange file permissions
chown user:group fileChange ownership of file
ls -lhList with human-readable permissions

Package Management

CommandDescription
sudo apt updateUpdate package list
sudo apt upgradeUpgrade installed packages
sudo apt install packageInstall a new package
sudo apt remove packageRemove a package
sudo apt autoremoveClean up unused packages
dpkg -lList installed packages

Searching & Finding Files

CommandDescription
find /path -name filenameFind file by name
grep 'pattern' fileSearch for text inside files
grep -r 'pattern' dirRecursive search in directory
locate filenameFind file using locate database
which commandShow command location in PATH
awk '/pattern/ { action }' fileSearch and process text with pattern matching

System Information & Monitoring

CommandDescription
uname -aKernel & OS info
topLive system processes
htopAdvanced process viewer
df -hDisk space usage
du -sh dirSize of a directory
free -hMemory usage
uptimeHow long system has been running

User Management

CommandDescription
whoamiCurrent user
adduser userAdd new user
passwd userChange user password
usermod -aG group userAdd user to group
deluser userDelete user

Networking Essentials

CommandDescription
ip aShow network interfaces
ping hostPing a server
curl urlFetch web content
wget urlDownload files
netstat -tulnpList listening ports
ss -tulnpModern replacement for netstat
scp src user@host:/pathSecure copy over SSH

SSH & Remote Management

CommandDescription
ssh user@hostSSH into a server
ssh -i key.pem user@hostSSH with private key
ssh-copy-id user@hostCopy SSH key to server
rsync -av src destSync files between local and remote

Must-Know Commands for Git

CommandDescription
git initInitializes git local repository
git clone repo_urlClone a repository
git statusCheck repo status
git add .Stage changes
git commit -m "message"Commit changes
git push origin branchPush to remote

Must-Know Commands for Docker

CommandDescription
docker psList running containers
docker imagesList images
docker run -it imageRun container interactively
docker stop containerStop container
docker exec -it container bashAccess 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

0
Subscribe to my newsletter

Read articles from Shahriar Rashid directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shahriar Rashid
Shahriar Rashid