Linux Commands Every DevOps Beginner Should Know

Pujan BhattaraiPujan Bhattarai
6 min read

Linux is the backbone of modern IT infrastructure, powering most servers, cloud platforms, and DevOps workflows. Over 96% of the top 1 million web servers worldwide are Linux-powered, highlighting its dominance in the server ecosystem. For DevOps engineers, mastering Linux is not optional—it’s essential. This blog is based on what I recently learned in Pravin Mishra’s Live DevOps for Beginners cohort, covering the fundamentals of Linux and essential commands for daily DevOps tasks.


What is Linux?

Linux is an open-source, Unix-like operating system used across desktops, servers, embedded devices, and cloud platforms. Unlike proprietary systems, Linux can be freely modified, distributed, and customized, giving engineers complete control over their environment. Its flexibility, stability, and security make it the preferred OS for production servers, cloud infrastructure, and DevOps automation.

Linux isn’t just an operating system—it’s an ecosystem. From running lightweight web servers to powering containers in Kubernetes clusters, Linux forms the foundation of modern IT operations. Its open-source nature also means there is a vast community, plenty of documentation, and extensive support for developers and engineers worldwide.


Why Linux is Important

Linux is central to DevOps and cloud engineering for several reasons:

  1. Stability and Reliability: Linux servers can run for years without rebooting. For critical applications, this reliability is crucial.

  2. Security: Its permission and user management systems, combined with open-source transparency, ensure strong security.

  3. Flexibility and Customization: You can build minimal systems for containers or fully-featured servers for enterprise workloads.

  4. Server and Cloud Dominance: Most of the world’s cloud platforms and over 96% of the top 1 million web servers run Linux.

In short, Linux is not only the operating system of choice but also a skill every DevOps engineer must master to efficiently manage, monitor, and deploy applications at scale.


Essential Linux Commands

File Management

File management is one of the most fundamental skills in Linux. As a DevOps engineer, you will constantly navigate the filesystem, organize scripts, and manage logs.

Some key commands:

ls - Lists files and directories. Options like ls -l show permissions, owners, and sizes, while ls -a shows hidden files.

cd - Changes directories. Navigating efficiently saves time when managing servers.

mkdir - Creates directories. Use mkdir -p to create nested directories in one command.

cat - Displays the entire content of a file

rm - Deletes files and directories. rm -r recursively removes directories; caution is needed to prevent accidental deletion.

Practical Use in DevOps: Organizing scripts for automation, backing up configuration files before deployment, and managing logs for troubleshooting.

Text Editors

Editing configuration files, writing scripts, and debugging are daily tasks for DevOps engineers. Linux provides multiple editors:

Nano – Beginner-friendly terminal-based editor. Easy to learn, ideal for quick edits.

Vim – Advanced editor with powerful features like macros, multi-file editing, and syntax highlighting. Essential for server administration.

Practical Use: Text editors are critical for configuring applications, managing deployment scripts, and debugging automation pipelines.

File Permissions

Linux file permissions control who can read, write, or execute files, maintaining system security and integrity.

ls -l – Shows permissions, ownership, and file size.

chmod – Changes file permissions. Example: chmod 755 script.sh makes it executable for everyone.

chown – Changes file ownership. Example: sudo chown user:group file.txt.

Practical Use in DevOps: Ensuring scripts and configuration files have the correct permissions prevents unauthorized access, accidental modification, and security vulnerabilities on production servers.

Process Monitoring & Control

Processes are programs running on your system. Monitoring and controlling them ensures server stability and efficient resource usage.

ps -e - Lists all running processes on the system along with their process IDs (PIDs). It’s useful for monitoring active processes, checking what’s currently running, and troubleshooting system performance issues.

ps aux | grep nginx – Lists all running nginx with details like PID, CPU, and memory usage.

pstree – Displays running processes in a tree-like structure, showing parent–child relationships between them. It’s useful for understanding how processes are organized, spotting which processes were started by others, and troubleshooting process dependencies.

kill - <PID> – Gracefully stops a process.

kill -9 <PID> – Forcefully terminates an unresponsive process.

Practical Use: Identifying resource-hogging processes, restarting services, and debugging issues during deployment or automation.

Networking Commands

ifconfig - ifconfig (interface configurator) is a command-line tool used in Linux and Unix systems to display and configure network interfaces. It shows details like IP addresses, MAC addresses, and network status, though it has been largely replaced by the ip command in modern systems

ping - This command tests network connectivity between your system and another host (like a server or website) by sending small packets of data and measuring the response time. It’s useful for troubleshooting network issues, checking if a server is reachable, and measuring latency.

dig- The dig (Domain Information Groper) command is used to query DNS servers for information about domain names, such as IP addresses, mail servers, and name servers.

wget - The wget command is used to download files from the internet directly to your Linux system via HTTP, HTTPS, or FTP. In DevOps, it’s useful for fetching scripts, packages, backups, or configuration files from remote servers for automation, deployment, or testing purposes.

Practical Use: Testing network connectivity between servers, monitoring open ports for security, and automating API checks during deployments.

System Information

uname -a - It displays detailed information about your system, including the kernel name, network node hostname, kernel version, machine hardware name, processor type, and operating system. It’s useful for quickly checking system details for troubleshooting, system monitoring, or compatibility purposes.

uptime - It shows how long the system has been running, the current time, the number of logged-in users, and the system load averages for the past 1, 5, and 15 minutes.

who - It displays a list of users currently logged into the system, along with their login terminals, login times, and sometimes their originating IP addresses.

free -h - This command shows the system’s memory usage, including total, used, free, and cached memory, in a human-readable format.

df -h - It shows the disk space usage of all mounted filesystems in a human-readable format (e.g., MB or GB). It’s useful for monitoring storage capacity, identifying full partitions, and managing disk resources effectively.

Practical Use: DevOps engineers rely on these commands to detect bottlenecks, optimize performance, and maintain healthy servers.

Conclusion:

Linux is the foundation of DevOps, cloud computing, and modern IT operations. From file management to process monitoring, networking, and disk management, mastering Linux commands equips engineers to automate tasks, troubleshoot issues, and manage infrastructure efficiently. Practicing these commands regularly will not only improve your confidence but also prepare you to handle real-world DevOps scenarios.

0
Subscribe to my newsletter

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

Written by

Pujan Bhattarai
Pujan Bhattarai

I am a cloud enthusiast with expertise in designing scalable and secure cloud solutions. I have hands-on experience in Docker for efficient containerization and application deployment. Passionate about simplifying complex technologies, I share my knowledge through informative blogs to inspire and educate others in the tech community.