Skip to main content

Linux Notes for a Beginner DevOps Engineer

Updated 10 min readMarkdown
Part of seriesLinux - Fundamentals for DevOps

If you have zero Linux knowledge, don't worry. You don't need to learn everything at once.

A professional DevOps engineer should understand Linux deeply because Linux is the foundation of servers, Docker, Kubernetes, CI/CD, cloud infrastructure, and automation.

Let's build your knowledge from beginner to professional level.

1. Linux Core Concepts (Understand the basics)

These are the first things you should understand.

Concept What it means
Linux An operating system used to run servers
Kernel The core that manages hardware, memory, and processes
Shell An interface to communicate with Linux
Terminal Where you type Linux commands
Process A running program
File System How Linux organizes files and directories
Root User The administrator user
Distribution A Linux operating system package, like Ubuntu
Package Manager Installs and manages software

Important mental models:

  • Everything is treated as a file in Linux.
  • Linux is case-sensitive.
  • Everything runs with permissions.
  • The kernel manages system resources.
  • Users interact with the kernel through applications and system calls.

2. Linux Directory Structure

A DevOps engineer must know where Linux stores things.

Directory Purpose
/ Root directory
/home User home directories
/root Root user's home
/etc Configuration files
/var Logs and changing data
/var/log System and application logs
/tmp Temporary files
/usr Applications and utilities
/bin Essential commands
/sbin System administration commands
/opt Optional software
/dev Device files
/proc Process and kernel information
/sys Kernel and hardware information
/boot Boot-related files

3. Essential Linux Commands

These commands should become second nature.

File and directory management

Command Purpose
pwd Show current directory
ls List files
ls -la Show all files with details
cd Change directory
mkdir Create directory
touch Create file
cp Copy files
mv Move or rename files
rm Remove files
cat Display file content
less Read large files
find Search for files

File content and text processing

Command Purpose
grep Search text
head Show first lines
tail Show last lines
tail -f Follow live logs
cut Extract columns
sort Sort text
uniq Remove repeated adjacent lines
wc Count lines, words, characters
awk Process structured text
sed Edit or transform text

System information

Command Purpose
uname -a Kernel information
hostname Machine name
uptime System running time
whoami Current user
free -h Memory usage
df -h Disk space
du -sh Directory size
lscpu CPU information
lsblk Block devices
top Live process monitoring
ps aux Running processes

4. Linux Users and Permissions

A professional DevOps engineer must understand Linux security and permissions.

Learn:

  • Users and groups.
  • Root and non-root users.
  • File ownership.
  • Read, write, execute permissions.
  • Permission numbers.
  • chmod
  • chown
  • chgrp
  • sudo
  • /etc/passwd
  • /etc/group
  • /etc/shadow

Example:

bash

chmod 755 script.sh
chown ubuntu:ubuntu script.sh
sudo systemctl restart nginx

Understand what 755 means:

  • Owner: Read, Write, Execute.
  • Group: Read, Execute.
  • Others: Read, Execute.

5. Linux Process Management

A DevOps engineer should know how applications run in Linux.

Learn:

  • What is a process?
  • What is a PID?
  • Parent and child processes.
  • Foreground and background processes.
  • Process signals.
  • Zombie and orphan processes.
  • CPU and memory consumption.

Important commands:

bash

ps aux
top
htop
pgrep nginx
kill <PID>
kill -9 <PID>
jobs
bg
fg
nice
renice

Understand signals:

Signal Purpose
SIGTERM (15) Request process termination
SIGKILL (9) Forcefully terminate process
SIGHUP (1) Hangup; often used to trigger reloads
SIGINT (2) Interrupt process

6. Linux Services and Systemd

This is extremely important in production environments.

Learn:

  • What is a Linux service?
  • What is systemd?
  • What is a daemon?
  • How to start and stop services.
  • How to enable services at boot.
  • How to troubleshoot failed services.

Commands:

bash

systemctl status nginx
systemctl start nginx
systemctl stop nginx
systemctl restart nginx
systemctl reload nginx
systemctl enable nginx
systemctl disable nginx

Check logs:

bash

journalctl -u nginx
journalctl -u nginx -f
journalctl -xe

7. Linux Networking

Networking is one of the most important skills for a DevOps engineer.

Learn:

  • IP addresses.
  • Public vs private IP.
  • TCP vs UDP.
  • Ports.
  • DNS.
  • HTTP vs HTTPS.
  • SSH.
  • Routing.
  • Subnets.
  • Firewalls.
  • Network interfaces.
  • Listening ports.

Important commands:

bash

ip addr
ip route
ss -tulnp
ping google.com
curl https://example.com
wget https://example.com
nslookup google.com
dig google.com
traceroute google.com
ssh user@server-ip

You should be able to troubleshoot:

  • Why can't I SSH into a server?
  • Why is my application not accessible?
  • Why is port 8080 not responding?
  • Why is DNS not resolving?
  • Why is my server unable to access the internet?

8. Linux Storage and Disk Management

Learn how Linux manages storage.

Topics:

  • Hard disks and SSDs.
  • Partitions.
  • Filesystems.
  • Mount points.
  • Inodes.
  • Disk usage.
  • Swap memory.
  • LVM.
  • File descriptors.

Commands:

bash

df -h
du -sh *
lsblk
blkid
mount
umount
free -h
fdisk -l

Understand these scenarios:

  • Disk is 100% full.
  • Application cannot write logs.
  • Filesystem is read-only.
  • Inode usage is 100%.
  • Server is running out of memory.

9. Linux Package Management

You should understand how to install and update software.

Distribution Package manager
Ubuntu apt
Debian apt
Amazon Linux dnf / yum
RHEL dnf / yum
Rocky Linux dnf
Alpine apk

Examples:

bash

# Ubuntu / Debian
sudo apt update
sudo apt install nginx
sudo apt remove nginx

# RHEL / Amazon Linux
sudo dnf install nginx
sudo dnf update

# Alpine
apk add nginx

10. Linux Logs and Troubleshooting

A professional DevOps engineer doesn't just run commands. They troubleshoot production problems.

Learn:

  • System logs.
  • Application logs.
  • Authentication logs.
  • Kernel logs.
  • Log rotation.
  • Disk-related errors.
  • Memory-related errors.
  • Service failures.

Important commands:

bash

journalctl
dmesg
tail -f /var/log/syslog
tail -f /var/log/messages
grep -i error application.log

Real-world troubleshooting examples:

  • Server is slow.
  • Application suddenly stopped.
  • CPU usage is 100%.
  • Memory is exhausted.
  • Disk is full.
  • Service keeps restarting.
  • Application logs show permission denied.

11. Linux Shell Scripting and Automation

DevOps engineers automate repetitive tasks.

Learn Bash scripting:

  • Variables.
  • Data types and strings.
  • Conditions (if/else).
  • Loops (for/while).
  • Functions.
  • Arguments.
  • Exit codes.
  • Environment variables.
  • Input/output redirection.
  • Pipes.
  • Cron jobs.

Example:

bash

#!/bin/bash

echo "Checking disk usage"

df -h

if [ $? -eq 0 ]; then
    echo "Disk check successful"
else
    echo "Disk check failed"
fi

Also learn:

bash

crontab -e
env
export
echo

12. Advanced Linux Concepts for Professional DevOps

Once you understand the fundamentals, move into these areas.

Topic What to understand
Kernel Kernel modules, system calls
Namespaces Process, network, mount, user isolation
Cgroups CPU and memory resource limits
Signals Process communication
File descriptors How processes access files and sockets
Pipes Communication between processes
System calls How applications interact with the kernel
Environment variables Application configuration
SSH Secure remote access and key authentication
Firewall iptables, nftables, firewalld
SELinux Mandatory access control
AppArmor Application security profiles
LVM Logical volume management
Inodes Filesystem metadata
Boot process BIOS/UEFI, bootloader, kernel, systemd

13. Linux Knowledge Required for Docker and Kubernetes

This is where Linux knowledge becomes especially important for DevOps.

Understand these relationships:

Linux concept Used in
Namespaces Container isolation
Cgroups Container resource limits
Overlay filesystem Container image layers
Network namespaces Container networking
Mount namespaces Container filesystem isolation
Capabilities Container privileges
iptables / nftables Container networking
Processes Container execution

Important: Docker containers are isolated Linux processes, not full virtual machines. Kubernetes orchestrates workloads that commonly run inside containers.

14. Real-world scenarios every DevOps engineer should solve

Knowing commands is not enough. You should be able to solve these problems independently.

Scenario What you should investigate
Server is slow CPU, memory, processes
Disk is full df, du, inodes
Application is down Processes, services, logs
Website is inaccessible DNS, IP, ports, firewall
SSH connection fails SSH service, keys, network
Permission denied Users, groups, permissions
High CPU usage top, ps, application
Memory exhausted free, processes, OOM logs
Port already in use ss, process information
Container keeps restarting Logs, exit codes, resources

Your goal should be:

  1. Understand what Linux is.
  2. Know how to navigate and manage files.
  3. Understand users and permissions.
  4. Understand processes and services.
  5. Understand networking.
  6. Troubleshoot server issues.
  7. Automate tasks using Bash.
  8. Understand how Linux powers Docker and Kubernetes.

One important rule: Don't just memorize commands. Understand what happens behind each command.

About the author

No comments yet. Be the first to comment.