If you've read our Still Not Job Ready After Learning DevOps? Free 100 Days of DevOps Challenge Blog, you already know that most beginners struggle not because they lack knowledge—but because they lack practical, hands-on experience.

That's exactly why the first domain in our upcoming 100 Days of DevOps Challenge is Linux.

Before we dive into containers, CI/CD pipelines, or infrastructure as code, we start with the one thing that powers everythingLinux. This blog is your beginner-friendly guide to that world—because without understanding Linux, you'll always be guessing in DevOps.


Why Linux Matters in DevOps

Linux is not just another operating system—it's the engine room of DevOps.

What is Linux?

Linux is an open-source operating system that acts as the backbone for most modern infrastructure. Think of it as the layer that sits between your applications and the hardware, managing resources, users, and permissions. It handles memory allocation, process scheduling, file access, device control, and networking. Its modular, secure, and flexible design is why it's the go-to OS for DevOps, developers, and system administrators around the world.

Why It Matters in DevOps:

  • Ubiquity: Most production servers run on Linux, not Windows or macOS.
  • Containers: Docker, Podman, and container runtimes leverage Linux kernel features like namespaces and cgroups.
  • Automation: Bash scripts, cron jobs, and configuration tools like Ansible work seamlessly on Linux.
  • Cloud-native: The major cloud providers (AWS, Azure, GCP) offer default Linux-based instances.
  • Security & Access: Permissions, firewalls, and auditing in Linux give you fine-grained control over system security.

Simply put, understanding Linux gives you the keys to everything else in DevOps.

Understanding Linux: The Essentials

Let's break down the core areas every beginner should master when starting with Linux. Each section below includes not just commands, but real explanations designed for complete beginners.

1. The Filesystem: Where Everything Lives

In Linux, everything is treated as a file — even hardware devices, sockets, and processes. These files and folders are arranged in a single hierarchical structure that starts at the root directory /.

Imagine the Linux filesystem like a family tree:

  • / is the root — the top-most “parent” directory.
  • Every other directory and file is a “child” or “descendant” of /.

This structure is very different from Windows, where you might have C:\D:\, and so on. In Linux, it’s all one unified structure.

Understanding Key Directories (Beginner’s Guide)

DirectoryWhat It ContainsReal Use Cases
/Root directory. Everything starts here.The base of the entire system.
/home/User folders (/home/nimesha, etc.)Store personal files, scripts, downloads.
/etc/Configuration filesConfigure services like Nginx, SSH, cron, firewall, etc.
/var/Variable data: logs, mail, spoolsMonitor logs (/var/log), troubleshoot crashes.
/usr/User-installed software and system-wide resourcesHolds app binaries and libraries.
/bin/ and /sbin/Essential system binaries and system commandsContains tools like ls, cp, shutdown.
/tmp/Temporary files (deleted on reboot)Store transient files like downloaded archives.
/opt/Optional third-party softwareInstall tools like Anaconda, or custom server software.
/dev/Device files for hardware (like USB, disks)Interact with drives and peripherals.
/proc/ and /sys/Kernel and process info presented as virtual filesUseful for system monitoring and diagnostics.

Real-World Example: Configuring a Web Server

Let’s say you’re deploying a web server using Nginx. Here’s where you’ll interact with the filesystem:

  • View Nginx config:
cd /etc/nginx/
ls -l
nano nginx.conf
  • Serve HTML from:
cd /var/www/html/
  • Check logs:
tail -f /var/log/nginx/access.log

Knowing where these files live saves you hours of guessing and lets you troubleshoot confidently.

How to Explore the Filesystem

Where am I?

pwd

What’s here?

ls -l

Move around:

cd /etc
cd ~/Downloads
cd ..

Tips:

  • .. moves you up one directory level.
  • ~ brings you back to your home directory.
  • Tab key = auto-complete paths. Use it always!

Clean Structure = Cleaner Scripts

When writing Bash scripts or automation code, referencing the correct path is key:

cp /etc/nginx/nginx.conf /home/nimesha/backup/

Misplacing even a single / can break your automation.

Best Practices for Beginners

  • Don't delete or modify anything in /etc or /bin unless you know what it does.
  • Keep your personal work (scripts, labs, etc.) in /home/yourname/.
  • Create a /home/yourname/projects/ folder to separate each task or project.
  • Back up important configs before editing:bashCopyEditcp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak

2. The Terminal: Your New Home

The terminal (also known as the shell or command line) is where you type commands to talk to the Linux system.

In DevOps, the terminal is your primary interface — even on remote cloud servers, you'll often log in via SSH and use only the terminal.

While desktop users might prefer clicking through graphical menus, DevOps engineers prefer commands over clicks — because it's:

  • faster
  • scriptable
  • repeatable
  • works on any server

Most Linux terminals use the Bash shell by default. It interprets your commands and runs them.

Why the Terminal Is So Important in DevOps

Every real-world task — from editing configurations, checking logs, restarting services, managing containers — is done in the terminal.

You’ll often be working on:

  • Headless cloud servers (no GUI)
  • Docker containers (only CLI access)
  • CI/CD runners (text-only environments)

Being comfortable in the terminal is non-negotiable.

Basic Terminal Commands (With Explanations)

Let’s walk through the most essential commands, along with what they do and when you’ll use them.

Where Am I?

pwd

Prints the current directory you're in. Great for orientation.

What’s Here?

ls
ls -l
ls -a

Lists files in the current directory. The -l shows details (owner, size, date). -a includes hidden files.

Move Around

cd /etc
cd ~/Downloads
cd ..

Changes directory. .. moves up one level. ~ is your home directory.

Clear the Clutter

clear

Wipes the screen clean. Good for focus during long sessions.

Need Help?

man ls

Shows the manual page for any command. Use q to quit.

You’ve been told that your Nginx configuration file might be broken. Here’s how you’d investigate:

cd /etc/nginx
ls -l
sudo nano nginx.conf

After editing, you can restart the service:

sudo systemctl restart nginx

Without the terminal, this would take much longer—or might not even be possible on a remote server.

Tip: Tab Completion Is Your Best Friend

Typing long paths or filenames?

Just press Tab and Bash will auto-complete the word. If it’s ambiguous, pressing Tab twice shows all options.

cd /var/lo<TAB> → /var/log/

Repeating and Reusing Commands

  • Press up arrow to cycle through previous commands.
  • !! runs your last command again.
  • Use history to view your command history:
history | grep ssh

You can even re-run a specific past command:

!45   # runs command number 45 from history

Practice Task for Beginners

Try navigating to your home directory and creating a practice folder:

cd ~
mkdir mypractice
cd mypractice
touch notes.txt
ls -l

Then open notes.txt using a terminal-based text editor:

nano notes.txt

Type something. Press Ctrl + O to save, Enter, and Ctrl + X to exit.

3. Files and Directories: Creating, Moving, Removing

In Linux, almost everything is a file — configuration files, user data, logs, and even representations of hardware. So, knowing how to manage files and directories is the foundation of everything else you'll do.

Whether you're setting up a web server, writing a script, or debugging a container — you'll be:

  • Creating and editing files
  • Organizing them into folders (directories)
  • Moving, renaming, or deleting them

Let’s break down these operations, step-by-step.

Create a New Directory (Folder)

mkdir myproject

Creates a new folder called myproject in the current location.

Real-world use: You’re starting a new script-based automation. You create a folder for it:

mkdir ~/projects/docker-cleanup
cd ~/projects/docker-cleanup

You can also create nested directories:

mkdir -p reports/2025/July

This creates reports, then 2025 inside it, and July inside that — all in one command.

Create a New File

touch notes.txt

Creates an empty file named notes.txt. Often used to create placeholder files, logs, or quick test files.

DevOps use case: Create a placeholder config file before writing:

touch docker-compose.yml

Edit a File

Use a terminal editor like nano or vim:

nano notes.txt
  • Type your content.
  • Press Ctrl + O to save, then Enter.
  • Press Ctrl + X to exit.

This is where you’ll often write:

  • Bash scripts
  • Configuration files
  • Log notes

View File Content

cat filename.txt     # Shows full content
less filename.txt    # Opens in scrollable view
head filename.txt    # Shows first 10 lines
tail filename.txt    # Shows last 10 lines

Tail in action:

tail -f /var/log/syslog

Live-streams system logs — very handy when debugging.

Rename or Move a File/Folder

mv oldname.txt newname.txt

Renames the file.

You can also move it to another location:

mv notes.txt /home/nimesha/documents/

Rename while moving:

mv config.yml /etc/nginx/nginx.conf

Copy a File or Folder

cp source.txt destination.txt

To copy a whole folder:

cp -r folder1 folder2

The -r means recursive — required for directories.

Example:
You want to back up a config file before editing:

cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak

Delete Files and Directories

rm file.txt

To remove a folder and its contents:

rm -r myfolder/

To force delete without confirmation:

rm -rf myfolder/

⚠️ Be very careful with rm -rf. It permanently deletes files — there’s no undo!

Pro Tip: Use ls After Every Action

Whenever you create, delete, or move something, run ls to verify:

ls -l

This builds your confidence and helps you avoid mistakes.

Real-World Task

  1. Create a project directory:
mkdir ~/devops/log-rotator
cd ~/devops/log-rotator
  1. Create and edit a file:
touch rotate.sh
nano rotate.sh
  1. Back it up:
cp rotate.sh rotate_backup.sh
  1. Move it to another folder:
mv rotate_backup.sh ~/backups/
  1. Clean up:
rm rotate.sh

4. Users and Groups: Managing Access

Linux is a multi-user system — even if you’re the only one using it, processes and services often run under different users. As a DevOps engineer, you’ll frequently:

  • Create system users for apps and services (e.g., nginxpostgres)
  • Manage user access to files and commands
  • Control who can do what

Understanding users and groups is the first step toward secure, multi-user systems.

Users

Every user in Linux has:

  • username
  • home directory (/home/username)
  • UID (User ID)
  • default shell

To see who you are:

whoami

List all users:

cat /etc/passwd

Create a new user:

sudo adduser john

Switch to that user:

su - john

Groups

Groups help you assign permissions to multiple users at once.

View current groups:

groups

Add user to a group:

sudo usermod -aG docker john

Here, John can now use Docker without sudo.

Common groups:

  • sudo: can run commands as root
  • docker: can run Docker
  • www-data: used by web servers

Real-World Example

You have a shared project directory:

sudo mkdir /var/shared_project
sudo groupadd devs
sudo chgrp devs /var/shared_project
sudo chmod 770 /var/shared_project

Now add your team members to the devs group:

sudo usermod -aG devs alice
sudo usermod -aG devs bob

Everyone in devs can now read/write in /var/shared_project.

The Superuser

The root user has full control. You should avoid using root directly, and instead use:

sudo somecommand

To run a command as admin.


5. Permissions and Ownership: Controlling Access

Linux uses a permission system to control who can read, write, or execute a file or directory. Without proper permissions:

  • Your app might not start.
  • Logs may fail to write.
  • Hackers might exploit loose access.

Understanding permissions is non-negotiable for system security and reliability.

Permission Breakdown: -rwxr-xr--

This is what you see when you run:

ls -l somefile.txt

Sample output:

-rwxr-xr– 1 nimesha devs 1200 Jul 23 12:00 somefile.txt

Breakdown of -rwxr-xr--:

  • First character: - = regular file (d = directory)
  • Next 3: rwx → owner can read, write, execute
  • Next 3: r-x → group can read, execute
  • Final 3: r-- → others can only read

So:

  • nimesha (owner) has full access
  • Group devs can read and execute
  • Everyone else can only read

Numeric Permissions: 777, 755, 644

Every permission group is a number:

  • r = 4
  • w = 2
  • x = 1

Add them up:

  • rwx = 4+2+1 = 7
  • rw- = 4+2 = 6
  • r-- = 4 = 4

Common combos:

  • 755: Owner full (7), group and others can read/execute (5)
  • 644: Owner can read/write, others can only read
  • 777: Everyone can do everything ❌ (avoid in production)

Changing Permissions

chmod 755 script.sh

Gives owner full rights, others read/execute only.

Make a script executable:

chmod +x deploy.sh

Changing Ownership

To change the file’s owner and group:

sudo chown alice:devs report.txt

Use -R for folders:

sudo chown -R www-data:www-data /var/www/html/

Real-World Example: Fixing Broken Web App

You deployed a Flask app and got a 403 Forbidden error.

Solution:

sudo chown -R www-data:www-data /var/www/myapp
sudo chmod -R 755 /var/www/myapp

You're giving ownership to the web server user and proper permissions to read/execute the files.


6. Installing Software: Package Managers

Linux doesn’t have an “App Store” like Windows or macOS. Instead, it uses package managers — powerful tools that let you:

  • Install new software
  • Remove it cleanly
  • Update it safely
  • Manage dependencies automatically

Whether you're setting up Docker, Nginx, Python tools, or even VS Code — it all goes through your package manager.

  • APT (Advanced Package Tool) → for Debian-based systems (Ubuntu, Kali, etc.)
  • YUM / DNF → for Red Hat-based systems (CentOS, Fedora, RHEL)
  • Zypper → for SUSE
  • Pacman → for Arch Linux

In DevOps, Ubuntu is most common — so we’ll use APT examples here.

Installing Software

sudo apt update          # Refreshes package list
sudo apt install nginx   # Installs Nginx web server

Why apt update?
This pulls the latest list of available software and versions from your configured repositories. Think of it as syncing your app store.

Want to install Git?

sudo apt install git

Need Python tools?

sudo apt install python3-pip

Updating Software

sudo apt upgrade

Upgrades all installed packages to the latest versions.

Upgrade everything in one go:

sudo apt update && sudo apt upgrade -y

The -y flag automatically says “yes” to all prompts — useful in scripts.

Removing Software

sudo apt remove nginx

This removes the program, but keeps config files.

To delete everything (including config):

sudo apt purge nginx

Clean up unused files:

sudo apt autoremove

Real-World DevOps Example: Installing Docker

Let’s say you want to install Docker:

sudo apt update
sudo apt install docker.io
sudo systemctl enable docker
sudo systemctl start docker

Verify it's working:

docker --version

Done! You’re now ready to build containers.

Adding External Repositories (Advanced)

Some software (like Node.js or VS Code) isn’t in the default list. You can add third-party repositories like this:

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs

This allows you to access more up-to-date or non-default software safely.


7. Services and Processes: Keeping Things Running

When you start a web server, a database, or even a background script — it becomes a process running on your system.

If you want these services to:

  • Start automatically on boot
  • Restart if they crash
  • Be managed securely by the system

…then you’ll use services, managed by a tool called systemd (most modern Linux systems use it).

Mastering services means you can manage what’s running on your system — and that’s DevOps gold.

Processes vs Services

  • Process: An individual running task (e.g., your Python script).
  • Service: A managed process under systemd (e.g., Nginx, Docker).

List processes:

ps aux          # View all running processes
top             # Real-time view of resource usage
htop            # Enhanced top (install with `sudo apt install htop`)

Kill a process:

kill <PID>
kill -9 <PID>   # Forcefully stop (only if needed)

Find a process:

ps aux | grep nginx

Managing Services with systemctl

To interact with services:

ActionCommand
Startsudo systemctl start nginx
Stopsudo systemctl stop nginx
Restartsudo systemctl restart nginx
Check statussudo systemctl status nginx
Enable on bootsudo systemctl enable nginx
Disablesudo systemctl disable nginx

Example:

sudo systemctl status docker

Shows if Docker is running, enabled at boot, and logs any failures.

Enable Autostart

Want your service to auto-start after a reboot?

sudo systemctl enable yourservice

Disable it from boot:

sudo systemctl disable yourservice

This is crucial for production — you don’t want to manually restart everything after a crash.

Real-World Example: Restarting a Failed App

Let’s say your web server crashed, and you want to:

  1. Check its status
  2. Restart it
  3. View logs
sudo systemctl status apache2
sudo systemctl restart apache2
journalctl -u apache2 --since today

This helps you troubleshoot and get back online quickly.

Bonus Tip: Kill Unresponsive Services

Sometimes a service hangs. You can stop it hard:

sudo systemctl stop nginx
sudo killall nginx

Or reboot the whole system (last resort):

sudo reboot

8. Bash Scripting: Automate Everything

Tired of repeating the same commands every time you spin up a server, install dependencies, or deploy an app?

That’s where Bash scripting comes in. With just a few lines, you can automate tasks like:

  • Installing packages
  • Backing up files
  • Deploying code
  • Running cron jobs
  • Checking service health

Bash is your Linux automation superpower. DevOps without Bash is like a pilot without a checklist.

What is a Bash Script?

A Bash script is simply a file with Linux commands, executed in order, line by line.

Sample:

#!/bin/bash

echo "Updating system..."
sudo apt update && sudo apt upgrade -y
echo "Done!"
  • The first line #!/bin/bash is called a shebang – it tells the system to use Bash to interpret the file.
  • echo prints text to the screen.

How to Create & Run a Script

  1. Create the file:
nano myscript.sh
  1. Add your commands, then save (Ctrl+OEnterCtrl+X in nano)
  2. Make it executable:
chmod +x myscript.sh
  1. Run it:
./myscript.sh

Add Logic: Conditions and Loops

You can add intelligence to your scripts:

Conditionals:

if [ -f /etc/passwd ]; then
  echo "User file exists."
else
  echo "File missing!"
fi

Loops:

for file in *.log
do
  echo "Found log file: $file"
done

Variables:

name="Nimesha"
echo "Hello, $name!"

Real-World Example: Deployment Script

#!/bin/bash

echo "Deploying Flask App..."

cd /home/ubuntu/myapp
git pull origin main

sudo systemctl restart flaskapp
echo "Deployment complete!"

This script:

  • Navigates to the project directory
  • Pulls the latest code from GitHub
  • Restarts the Flask service

💡 You could schedule this with a cron job (covered in Section 10).

Add Error Handling

#!/bin/bash
echo "Starting backup..."

tar -czf /backup/home.tar.gz /home || {
  echo "Backup failed!"
  exit 1
}

echo "Backup complete."

The || ensures you catch errors if something goes wrong.

Pro Tips

  • Always start with #!/bin/bash
  • Use set -e to make the script exit on any error
  • Comment your code with # so future-you can understand it
  • Don’t run destructive commands (like rm -rf) without confirmation

9. Linux Networking Essentials: Know Your Connections

Networking is the heart of DevOps. Whether you're:

  • Deploying a web server,
  • Debugging app latency,
  • Exposing services via Kubernetes,
  • Or connecting containers...

…you must understand how Linux handles networking. This section gives you the essentials to survive and thrive in DevOps environments.

How Linux Sees Networking

In Linux, everything is a file — even networks!

Here’s how the system understands its connectivity:

ConceptWhat It DoesCommand Example
IP AddressIdentifies your machineip a or ifconfig
HostnameYour system’s network namehostname
DNSConverts domain names to IPs/etc/resolv.conf, nslookup
Routing TableDefines paths for packetsip route
Network InterfacesPhysical or virtual devices (eth0, lo)ip link, ifconfig

Check IP Address

ip a

Shows all interfaces and their assigned IPs.

Look for eth0 or ens33 — that's usually your network interface. 127.0.0.1 is your localhost.

Alternative:

ifconfig

Test Connectivity

Ping a website:

ping google.com

Ping an IP address:

ping 8.8.8.8

If DNS is down, pinging domain names fails but IPs may work.

Check DNS resolution:

nslookup google.com

Trace a route:

traceroute google.com

This shows every hop your request takes — useful for spotting slow points.

Open Ports and Listening Services

What services are listening for connections?

ss -tuln
  • t = TCP, u = UDP, l = Listening, n = numeric (don't resolve hostnames)

Example output:

State      Recv-Q Send-Q Local Address:Port  Peer Address:Port
LISTEN     0      128    0.0.0.0:80          0.0.0.0:*

That means something (probably Nginx or Apache) is listening on port 80.

Want to see who’s using port 80?

sudo lsof -i :80

Firewall: Managing Access

Most Linux distros use UFW (Uncomplicated Firewall) on top of iptables.

Enable firewall:

sudo ufw enable

Allow traffic to port 22 (SSH):

sudo ufw allow 22

Deny traffic to port 80:

sudo ufw deny 80

View current rules:

sudo ufw status

Real-World Scenario: Exposing a Web App

Let’s say you deploy a Node.js app on port 3000.

  1. Run the app:
node app.js
  1. Ensure it’s listening:
ss -tuln | grep 3000
  1. Allow external access (if needed):
sudo ufw allow 3000
  1. Test locally:
curl http://localhost:3000
  1. Test from another machine (replace with IP):
curl http://192.168.1.100:3000

Done! You just exposed a local app over the network.


10. Crontab – Scheduling Repetitive Tasks

In the world of DevOps, automation isn’t just about running tasks — it’s about running them at the right time without human intervention.

Want to:

  • Back up logs every night?
  • Run health checks every 5 minutes?
  • Clean up temp files weekly?

You don’t need a fancy scheduler. Just use cron — the built-in job scheduler for Unix/Linux.

What is Crontab?

  • Cron is the background daemon that runs scheduled tasks.
  • Crontab (short for “cron table”) is the file where you define those tasks.

Every user (even root) can have their own crontab.

Crontab Syntax

Each line in a crontab follows this format:

* * * * * command_to_run
| | | | |
| | | | +----- Day of the week (0 - 6) (Sunday = 0)
| | | +------- Month (1 - 12)
| | +--------- Day of the month (1 - 31)
| +----------- Hour (0 - 23)
+------------- Minute (0 - 59)

Examples:

ScheduleCrontab Expression
Every minute* * * * *
Every hour0 * * * *
Every day at 2:00 AM0 2 * * *
Every Monday at 5:30 PM30 17 * * 1
Every Sunday at midnight0 0 * * 0

Creating and Editing a Crontab

To edit your crontab:

crontab -e

Choose a text editor (if prompted), then add your scheduled commands.

To view your crontab:

crontab -l

To remove your crontab:

crontab -r

Pro Tip: Use Full Paths

When using cron, always use full paths to files and commands, because it doesn't load your normal shell environment.

For example, instead of:

python script.py

Use:

/usr/bin/python3 /home/ubuntu/scripts/backup.py

Use which python3 or which node to find full paths.

Real-World Example: Log Backup Script

Let’s say you want to back up logs every night at 11 PM.

  1. Create a script:
#!/bin/bash
tar -czf /backups/logs_$(date +\%F).tar.gz /var/log
  1. Make it executable:
chmod +x /home/ubuntu/scripts/log_backup.sh
  1. Add to crontab:
crontab -e

Add this line:

0 23 * * * /home/ubuntu/scripts/log_backup.sh >> /var/log/cronlog.log 2>&1

This runs at 11:00 PM every day and logs output/errors.

Automate Temp File Cleanup (Bonus Example)

0 2 * * * find /tmp -type f -mtime +7 -delete

Deletes files older than 7 days in /tmp every day at 2 AM.

Debugging Cron Jobs

  • Log output by appending >> /path/to/logfile 2>&1
  • Check cron logs:
grep CRON /var/log/syslog  # On Ubuntu/Debian

11. Monitoring Basics – Watching Your System's Health

Whether you're managing a local VM, a bare-metal server, or a Kubernetes node — your system is only as reliable as your ability to monitor it.

In real-world DevOps, it’s not enough to deploy an app — you need to know:

  • Is it consuming too much memory?
  • Is disk space running low?
  • Is the CPU being maxed out?
  • Which process is causing issues?

Linux provides built-in tools that give you real-time and historical system health insights.

Check CPU & Memory Usage

View live system stats:

top

Shows real-time updates on CPU usage, memory, and running processes. You’ll see:

  • %CPU: how much of the processor is being used
  • %MEM: memory usage
  • COMMAND: what is using the resources

More readable version:

htop

🛠️ If it’s not installed:

sudo apt install htop   # Debian/Ubuntu
sudo yum install htop   # CentOS/RHEL

Use arrow keys to sort by CPU or memory usage. Press F9 to kill a process.

Monitor Disk Usage

Check free space:

df -h
  • -h: human-readable (MB, GB)
  • Useful to check if / or /home is almost full

Example output:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        50G   45G  2.5G  95% /

Here, you're in trouble — only 5% free. You’d better clean up logs or expand storage.

Check folder size:

du -sh /var/log
  • -s: summary only
  • -h: human-readable
  • Shows how much space logs or a specific folder takes

To list top disk-consuming directories:

du -sh /* | sort -hr | head -10

Monitor Network Usage

Real-time network:

iftop

This shows which IPs/ports are using your bandwidth.

🛠️ To install:

sudo apt install iftop

Check port usage:

netstat -tulnp

Shows open ports and listening services.

Or use:

ss -tuln

More modern and faster than netstat.

Real-World Scenario: Troubleshoot a Slow Server

Imagine your web app is slow.

  1. Check CPU usage:
top

→ You find a Python process using 98% CPU.

  1. Kill it:
kill -9 <PID>
  1. Check disk space:
df -h

→ You see /var is full. You find large log files:

du -sh /var/log/*

→ Clear unnecessary logs:

sudo rm /var/log/old-app.log
  1. Restart service:
sudo systemctl restart nginx

Problem resolved in 5 minutes. That’s DevOps.

Setup Alerts (Optional)

Once you're familiar with manual tools, level up with automatic monitoring tools:

  • Nagios
  • Prometheus + Grafana
  • Zabbix
  • Netdata

These tools provide dashboards and alerts when thresholds are breached (e.g., high CPU or low disk).

🎯 Final Thoughts

Congratulations! You now have a solid foundation in:

  • Navigating the Linux filesystem
  • Understanding file permissions
  • Managing users and groups
  • Installing software
  • Running and monitoring services
  • Writing Bash scripts
  • Scheduling cron jobs
  • Diagnosing networks
  • Monitoring system performance

This isn’t just theory — this is how real systems work.

You’re Not “Too Late” to Learn Linux

Every DevOps expert once googled “How do I exit Vim?”

Linux is not about being a genius. It’s about building habits, one command at a time.

If you stay consistent, even 15 minutes a day will lead to a deeper understanding, better problem-solving, and more confidence in DevOps tasks.

Practice: How to Actually Learn All This

Linux isn’t learned by watching videos—it’s learned by doing.

Try:

  • Spinning up a Linux VM using VirtualBox or WSL
  • Completing real tasks via FREE KodeKloud Linux Labs
  • Maintaining a journal of what commands you used and why

Practice builds confidence.


🎉 You’re now officially Linux-literate — and ready to crush the first domain of the upcoming 100 Days of DevOps Challenge by KodeKloud.

Ready for Git, Docker, Kubernetes, CI/CD, and more?

Keep building. Keep breaking. Keep learning.

Linux is your foundation — and you're standing strong now.