Linux Commands for DevOps Warriors

Aparna Rathore
2 min readAug 24, 2023

--

Certainly, here are some Linux commands that are commonly used by DevOps professionals for managing servers, deploying applications, and performing various tasks in a DevOps environment:

1. **Navigation and File Operations:**
— `cd`:
Change directory.
— `ls`: List files and directories.
— `pwd`: Print the current working directory.
— `mv`: Move or rename files/directories.
— `cp`: Copy files/directories.
— `rm`: Remove files/directories.
— `touch`: Create empty files.
— `chmod`: Change file permissions.
— `chown`: Change file ownership.

2. **System Information and Monitoring:**
— `top`:
Display real-time system information and process list.
— `htop`: Interactive version of `top` with more features.
— `df`: Display disk space usage.
— `free`: Display memory usage.
— `uname`: Display system information.
— `ifconfig` or `ip`: Network interface information.
— `netstat`: Network statistics.

3. **Package Management:**
— `apt-get` (Debian/Ubuntu) or `yum` (Red Hat/CentOS):
Package management and installation.
— `dpkg` (Debian/Ubuntu) or `rpm` (Red Hat/CentOS): Direct package management.
— `pip` or `pip3`: Python package installer.

4. **Process Management:**
— `ps`: Display running processes.
— `kill`: Terminate processes.
— `pkill`: Kill processes by name.
— `systemctl`: Control system services (systemd-based systems).

5. **Networking:**
— `ping`: Test network connectivity.
— `curl` or `wget`: Download files from the internet.
— `ssh`: Securely access remote servers.
— `scp`: Securely copy files between local and remote servers.
— `nc`: Netcat utility for network debugging.

6. **Text Processing:**
— `grep`: Search for patterns in text.
— `sed`: Stream editor for text manipulation.
— `awk`: Text processing language for data extraction.

7. **Version Control:**
— `git`: Version control system.

8. **Containerization:**
— `docker`: Docker container management.
— `docker-compose`: Define and run multi-container Docker applications.

9. **Automation and Scripting:**
— `bash`: Linux shell scripting.
— `cron`: Schedule tasks to run at specific intervals.
— `ansible`: Configuration management and automation tool.
— `terraform`: Infrastructure as Code (IaC) tool.

10. **Logs and Monitoring:**
— `tail`: Display the last part of a file (often used for log files).
— `grep`: Search for specific patterns in log files.
— `journalctl`: Query and display logs from the systemd journal.

These commands are just a starting point, and depending on your specific tasks and environment, you might need to use additional commands and tools. Always refer to the relevant documentation and resources to learn more about each command and its options.

--

--

Aparna Rathore
Aparna Rathore

Written by Aparna Rathore

A Tiny Girl with not so many tiny dreams.

No responses yet