Cloud Institution

Linux Administration Commands

By Pooja | 23rd July 2025

Introduction

 Linux is the go-to operating system powering cloud infrastructure, container platforms, CI/CD pipelines, and production environments. At the core of managing and maintaining Linux-based systems are Linux administration commands—the tools that give engineers control over system resources, services, users, networks, and security.

Whether you’re configuring a CI/CD pipeline, securing access to cloud VMs, deploying containerized microservices, or monitoring logs, Linux admin commands are indispensable. This article provides an in-depth overview of the most important Linux administrative commands relevant to DevOps workflows.

Role of Linux in DevOps

Linux is the dominant OS in the DevOps landscape due to:

  • Its open-source nature
  • Support for containerization and orchestration tools (Docker, Kubernetes)
  • Native compatibility with cloud providers (AWS, Azure, GCP)
  • Rich CLI utilities for scripting and automation
  • Extensive community support and documentation

For DevOps professionals, understanding Linux isn’t optional—it’s mandatory.

Why Linux Administration Skills Are Crucial

Linux administration involves tasks such as:

  • Managing users and permissions
  • Configuring services
  • Monitoring resource usage
  • Maintaining security
  • Automating system tasks

These are central to:

  • Running production systems
  • Scaling infrastructure
  • Deploying software
  • Securing environments

A DevOps engineer’s effectiveness depends on how well they use Linux commands to manage systems.

Core Administrative Areas in DevOps

Linux administration in DevOps typically includes:

  • System information & uptime
  • Disk and file system management
  • User and group administration
  • Process and service control
  • Network diagnostics
  • Permissions and ownership
  • Software installation and upgrades
  • Logging and monitoring
  • Cron jobs and automation
  • Backup and restoration

System Information and Management Commands

These commands give insight into system health and status:

Command

Purpose

Example

uname -a

Displays system info

uname -a

hostname

Shows or sets system name

hostname dev-server

uptime

Shows system uptime

uptime

free -m

Memory usage in MB

free -h

vmstat

Memory, CPU, I/O usage

vmstat 3

lscpu

Displays CPU info

lscpu

lsblk

Lists block devices

lsblk

df -h

Disk usage of filesystems

df -h

du -sh /path

Folder size

du -sh /opt/logs

Use case: System diagnostics, resource allocation planning.

User and Group Management

Controlling access and privileges:

Command

Purpose

Example

adduser

Adds a user

adduser deployer

userdel

Deletes a user

userdel -r olduser

usermod

Modify user properties

usermod -aG docker devops

passwd

Set/change password

passwd deployer

groupadd

Create group

groupadd admins

groups

Show groups of user

groups devops

id

Show UID/GID

id jenkins

Use case: Managing SSH access, automation user creation, RBAC setup.

Disk and File System Administration

Storage and file system configuration:

Command

Purpose

Example

mount

Mount a filesystem

mount /dev/sdb1 /mnt/data

umount

Unmount a drive

umount /mnt/data

fsck

Check and repair file system

fsck /dev/sda1

mkfs

Format disk

mkfs.ext4 /dev/sdb

blkid

Display block device info

blkid /dev/sda1

tune2fs

Tune ext file systems

tune2fs -l /dev/sda1

Use case: Adding cloud-attached volumes, formatting ephemeral storage.

Service and Process Management

Starting, stopping, and monitoring processes and services:

Command

Purpose

Example

ps aux

List all processes

`ps aux

top / htop

Real-time process monitoring

top

kill / killall

Terminate process

kill 1234

systemctl

Control services

systemctl restart nginx

service

Legacy service manager

service apache2 status

journalctl

View logs from systemd

journalctl -u sshd

Use case: Restarting failed apps, checking memory leaks, managing background services.

Network Configuration and Troubleshooting

Diagnosing and configuring network interfaces:

Command

Purpose

Example

ip a

Show IP addresses

ip a

ip r

Show routing table

ip r

ping

Check host availability

ping google.com

netstat -tulnp

Listening ports and services

netstat -tulnp

ss

Detailed socket stats

ss -lnt

nmap

Port scanning

nmap 192.168.0.1

curl

Transfer data from/to URL

curl http://localhost:3000

Use case: Debugging service connectivity, DNS resolution, firewall issues.

More deep into this Importance of Linux in DevOps

Security and Permission Management

Securing Linux environments is a critical admin role:

Command

Purpose

Example

chmod

Change permissions

chmod 755 deploy.sh

chown

Change ownership

chown dev:dev config.yaml

umask

Default permission mask

umask 022

firewall-cmd

Configure firewalld

firewall-cmd –add-port=8080/tcp

ufw

Easy firewall management

ufw enable

sudo

Elevate privileges

sudo systemctl restart nginx

Use case: Hardening cloud instances, managing SSH and firewall rules.

Software and Package Management

Managing installed software:

Command

Purpose

Example

apt

Debian-based package manager

apt install docker.io

yum / dnf

RHEL-based systems

yum update -y

snap

Install snap packages

snap install helm –classic

dpkg

Install .deb packages

dpkg -i package.deb

rpm

Install .rpm packages

rpm -ivh package.rpm

Use case: Installing DevOps tools (Terraform, Jenkins, Helm), upgrading libraries.

System Logs and Monitoring

Managing installed software:

Command

Purpose

Example

apt

Debian-based package manager

apt install docker.io

yum / dnf

RHEL-based systems

yum update -y

snap

Install snap packages

snap install helm –classic

dpkg

Install .deb packages

dpkg -i package.deb

rpm

Install .rpm packages

rpm -ivh package.rpm

Use case: Installing DevOps tools (Terraform, Jenkins, Helm), upgrading libraries.

Backup and Scheduling Utilities

Automating tasks and managing backups:

Command

Purpose

Example

cron

Scheduled tasks

crontab -e

rsync

Efficient backups

rsync -av /var/www /mnt/backup/

tar

Archive files

tar -czvf backup.tar.gz /etc/

at

Schedule one-time jobs

`echo ‘reboot’

Use case: Schedule nightly backups, log cleanup, periodic service restarts.

Real-World Use Cases in DevOps

  • Provisioning a new VM
    Using useradd, apt, systemctl, iptables to configure a usable server.
  • Deploying an app manually
    Using git, systemctl, tar, and chmod to deploy web apps.
  • Securing an EC2 instance
    Modifying /etc/ssh/sshd_config, managing ufw, setting chmod for SSH keys.
  • Monitoring logs in production
    Using journalctl, tail, and grep to analyze performance or errors.
  • Scaling infrastructure with automation
    Using cron, rsync, and systemctl to automate scale-up tasks.

Best Practices

  • Use sudo over logging in as root
  • Keep system up-to-date with apt update && apt upgrade
  • Use screen or tmux for long-running commands
  • Secure SSH with key-based auth and disable password login
  • Use logrotate to manage log file size
  • Monitor disk space with df -h and /var/log/ growth

Conclusion

In the DevOps world, Linux administration commands are the tools of the trade. From provisioning and securing servers to monitoring and maintaining applications, mastering these commands enables DevOps professionals to build scalable, reliable, and secure systems.

Understanding how to navigate the Linux ecosystem via the CLI is not just helpful—it’s absolutely essential. The more fluency you have with these admin commands, the more control, automation, and insight you gain over your infrastructure.

Leave a Comment

Your email address will not be published. Required fields are marked *

Explore Our Recent Blogs

Scroll to Top