Essential Linux Commands Every DevOps Beginner Should Know

Continuing the Linux for DevOps Journey
In my previous article, we explored the Linux File System and how everything in Linux starts from a single root directory /.
That article focused on understanding how Linux organizes files and directories — an important first step toward thinking like a DevOps engineer.
But once you understand where things live in Linux, the next natural question becomes:
How do we actually interact with the system?
That’s where Linux commands come in.
When working with servers, containers, CI/CD pipelines, or cloud infrastructure, DevOps engineers spend a large portion of their time interacting with systems through the terminal.
At first, the terminal can feel intimidating — just a blinking cursor on a dark screen.
But over time, you realize something important:
The terminal isn't complicated.
It simply speaks a different language.
And that language is made up of commands.
Once you become comfortable with a small set of essential commands, the terminal transforms from something intimidating into one of the most powerful tools in your DevOps toolkit.
In this article, we’ll explore Essential Linux Commands Every DevOps Beginner Should Know — along with how they are actually used in real-world systems.
Why Linux Commands Matter in DevOps
Modern infrastructure heavily relies on Linux.
Most environments where DevOps engineers work — including:
✅ Cloud servers
✅ Docker containers
✅ Kubernetes clusters
✅ CI/CD pipelines
run on Linux-based systems.
Because of this, engineers frequently use the terminal to:
✅ Navigate the system
✅ Inspect logs
✅ Manage files
✅ Monitor running processes
✅ Debug production issues
Instead of relying on graphical interfaces, Linux commands allow engineers to work faster, automate tasks, and troubleshoot systems efficiently.
Let’s explore some of the commands that form the foundation of everyday Linux operations.
Navigating the Linux File System
Before managing files or debugging systems, you first need to move around the system confidently.
1. pwd — Print Working Directory
The pwd command shows your current location in the Linux file system.
Example:
pwd
Output:
/home/rahul/projects
DevOps use case:
When connected to remote servers, it's easy to lose track of your location. pwd helps confirm exactly where you are.
2. ls — List Files and Directories
The ls command lists files and directories.
ls
Useful options:
ls -l
ls -a
DevOps use case:
Inspect directories when reviewing configuration files or debugging deployments.
cd /var/log
Move back one directory:
cd ..
DevOps use case:
Navigate to directories that store logs, configuration files, or application data.
Managing Files and Directories
Once you can move around the system, the next step is managing files.
4. mkdir — Create Directories
mkdir project
Create nested directories:
mkdir -p project/dev/app
Creating directory structures for applications, environments, or deployment artifacts.
5. touch — Create Files
touch config.yaml
DevOps use case:
Creating configuration files or placeholder scripts.
6. cp — Copy Files
cp file.txt backup.txt
Copy directories:
cp -r folder1 folder2
DevOps use case:
Backing up configuration files before making changes.
7. mv — Move or Rename Files
mv file.txt /home/rahul/
Rename files:
mv old.txt new.txt
DevOps use case:
Organizing deployment files or renaming configuration files.
8. rm — Remove Files
rm file.txt
Delete directories:
rm -r folder
⚠️ Important: Use this command carefully — deleted files cannot easily be recovered.
DevOps use case:
Cleaning temporary files or outdated logs.
Viewing and Searching Files
In real systems, DevOps engineers frequently work with configuration files and logs.
9. cat — View File Content
cat config.yaml
DevOps use case:
Quickly inspect configuration files.
10. less — Read Large Files
less logfile.log
Unlike cat, less allows scrolling through large files.
DevOps use case:
Reading long log files without overwhelming the terminal.
11. grep — Search Inside Files
grep error app.log
DevOps use case:
Search for specific messages inside application logs.
This is extremely useful when investigating system failures.
12. find — Locate Files
find /var/log -name "*.log"
DevOps use case:
Locate configuration files or log files across large systems.
Managing Permissions and Processes
These commands become especially important when managing production systems.
13. chmod — Change File Permissions
chmod 755 script.sh
DevOps use case:
Allow scripts to become executable during deployments.
14. chown — Change File Ownership
chown user:group file.txt
DevOps use case:
Ensuring correct ownership for application files.
15. ps — View Running Processes
ps aux
DevOps use case:
Check whether services are running.
16. top — Monitor System Processes
top
Shows real-time CPU and memory usage.
DevOps use case:
Monitor system load when diagnosing performance issues.
Monitoring System Resources
Production servers must be monitored regularly.
17. df — Check Disk Space
df -h
DevOps use case:
Ensure servers are not running out of storage.
18. du — Check Directory Size
du -sh *
DevOps use case:
Identify directories consuming large amounts of disk space.
19. history — View Command History
history
DevOps use case:
Quickly reuse previously executed commands.
20. clear — Clear the Terminal
clear
Helps keep the terminal readable.
Networking and System Utilities
DevOps engineers often need to verify connectivity or test services.
21. ping — Test Network Connectivity
ping devopsjourneywithrahul.hashnode.dev
DevOps use case:
Check if a server can reach another host.
22. curl — Test APIs
curl https://example.com
DevOps use case:
Verify API responses or test service endpoints.
23. wget — Download Files
wget https://example.com/file.zip
DevOps use case:
Download packages or deployment artifacts.
24. sudo — Run Commands with Elevated Privileges
sudo apt update
DevOps use case:
Execute administrative tasks on servers.
25. man — Access Command Documentation
man ls
DevOps use case:
Learn command options directly from the terminal.
A Practical Way to Learn Linux Commands
The best way to learn Linux commands is not by memorizing them, but by using them regularly.
Try simple exercises like:
✅ Navigating directories
✅ Reading system logs
✅ Monitoring running processes
✅ Searching files across the system
Over time, these commands become second nature.
Final Thoughts 🚀
DevOps is not just about learning tools like Docker, Kubernetes, or CI/CD platforms.
It begins with understanding the systems that power those tools.
In the previous article, we explored the Linux file system — how files, directories, and system components are organized.
In this article, we took the next step by learning how to interact with that system using essential Linux commands.
These commands may appear simple at first, but they form the foundation of everyday system operations.
As you continue exploring Linux, you'll start seeing how these commands naturally integrate into tasks like:
• debugging applications
• managing deployments
• monitoring system health
• investigating failures
And slowly, the terminal stops feeling intimidating and starts feeling like a powerful interface to the system.
That’s where the DevOps mindset truly begins to develop.
💬 Which Linux command do you use the most in your daily workflow?
Let me know in the comments!
If you're also learning DevOps, feel free to follow this series as I continue documenting my journey step by step.
See you in the next post. 🚀






