Skip to main content
AIDevOps
  • Learn
  • Learning Paths
  • Practice
  • Open Source
  • Books
  • Engineering

    AI DevOpsThe full map of building and operating AI servicesLLMOpsLLM deployment · evaluation · observabilityHands-on ProjectsBuild AI Agent projects

    Knowledge

    DocsTechnical documentationBlogEngineering articlesPloggerDevelopment log feed

    Validate

    Certification3-level skills certification · coming soon
AI Models
LlamaTutorial|MistralTutorial|GemmaTutorial|DeepSeekTutorial|QwenTutorial
🐳 DevOps
DevOps Intro & RoadmapLinuxDockerCI/CD|Kubernetes BasicsK8s AdvancedPrometheusGrafana
🤖 AI Applied Development
Applied AI Intro & RoadmapHugging FaceLangChainLlamaIndexLLMOps|LangGraphMCPMulti-AgentAgent Evaluation
🧠 AI Core
AI Intro & RoadmapML FundamentalsLLM Fundamentals|Python AIC++|PyTorchTensorFlowJAX
🧠 AI Agent Development
Finance AI AgentLLM API ServerStock Investing AgentAIOps AI AgentEducation AI AgentCoding AI Agent
🌱 Spring Cloud
Spring Intro & RoadmapSpring Cloud GatewaySpring BootJava|Spring AISpring SecuritySpring BatchSpring JPA
🧱 Infrastructure
Infrastructure Intro & RoadmapNginxRedis
☁️ Cloud
Cloud Intro & RoadmapAWSGCPAzureNCPCloudflare
🎨 Frontend
Frontend Intro & RoadmapJavaScriptTypeScript|ReactNext.js|VueNuxt|Electron
📱 Mobile
Mobile Intro & RoadmapKotlinAndroidFlutter
⚙️ Backend
Backend Intro & RoadmapPython BasicsFastAPIDjangoFlask|CGoGinNode.js
💾 Database
DB Intro & RoadmapCore SQLOracleMySQLPostgreSQL|MongoDBVector DB
🧪 Testing
k6JMeternGrinder
AIDevOps

Engineering AI. From Code to Production.
An engineering learning platform for building and operating AI and AI Agents

Learn

  • All Guides
  • Learning Paths
  • AI Tutorial
  • Practice
  • Books

Resources

  • AI DevOps
  • LLMOps
  • Hands-on Projects
  • Docs
  • Blog
  • Plogger
  • Open Source
  • Certification (coming soon)

Start Here

  • AI Core Roadmap
  • AI Applied Development Roadmap
  • Spring Cloud Roadmap
  • DevOps Roadmap
  • Infrastructure Roadmap

 

  • Cloud Roadmap
  • Frontend Roadmap
  • Mobile Roadmap
  • Backend Roadmap
  • Database Roadmap
© 2026 AIDevOps. All rights reserved.
Terms of ServicePrivacy PolicySitemaptestforge.kr
  1. Home
  2. Learn
  3. DevOps
  4. Linux
Complete guide to Linux system architecture & server operations

🐧 Linux Complete Guide

Visitors

From the moment Linux boots to the moment a service handles a request — kernel and user space structure, the boot process, the filesystem hierarchy (FHS), the permission model, the process lifecycle, systemd, the network stack, storage and memory, logging, security hardening, performance diagnosis, and the kernel foundations of containers (namespaces and cgroups) — a complete guide, with diagrams, to understanding Linux as one system.

  • Beginner
  • Updated Oct 1, 2026
  • ~15 min read
  • 16 sections
  • 15 code examples
  • Web IDE lab included
🐧

Linux Web IDE

Run code in the browser with nothing to install and learn through step-by-step examples.

Open the Web IDE →
Understanding system architecturesystemd & process operationsDesigning network and storage layoutsSecurity hardening & performance troubleshooting

Related frameworks & environments

🐳Docker→CICI/CD→☸️Kubernetes Basics→

Contents

0 / 19
  1. How to use this guide
  2. Architecture diagrams
  3. Architecture & the boot process
  4. Filesystem hierarchy (FHS)
  5. Permission & ownership model
  6. Essential commands
  7. Process management & lifecycle
  8. systemd & service management
  9. Network stack & firewall
  10. Storage (LVM) & memory/swap
  11. Logging system (journald)
  12. Security hardening
  13. Performance diagnosis & troubleshooting
  14. Kernel foundations of containers
  15. Shell scripting
  16. Linux design
  17. Operating standards
  18. Verification strategy
  19. Frequently asked questions
Contents 19 sections
  1. How to use this guide
  2. Architecture diagrams
  3. Architecture & the boot process
  4. Filesystem hierarchy (FHS)
  5. Permission & ownership model
  6. Essential commands
  7. Process management & lifecycle
  8. systemd & service management
  9. Network stack & firewall
  10. Storage (LVM) & memory/swap
  11. Logging system (journald)
  12. Security hardening
  13. Performance diagnosis & troubleshooting
  14. Kernel foundations of containers
  15. Shell scripting
  16. Linux design
  17. Operating standards
  18. Verification strategy
  19. Frequently asked questions

How to use this guide

How to read it

Understanding Linux as a real-world workflow

From the moment Linux boots to the moment a service handles a request — kernel and user space structure, the boot process, the filesystem hierarchy (FHS), the permission model, the process lifecycle, systemd, the network stack, storage and memory, logging, security hardening, performance diagnosis, and the kernel foundations of containers (namespaces and cgroups) — a complete guide, with diagrams, to understanding Linux as one system. Rather than listing concepts, this guide is organized so you can follow the content in the order you have to make decisions on a real project.

Key perspective

Infrastructure / operations

Rather than memorizing install commands, understand the order in which traffic, runtime, observability, and incident response connect.

Understanding system architecturesystemd & process operationsDesigning network and storage layoutsSecurity hardening & performance troubleshooting

Architecture diagrams

To make what you read stick, it helps to capture the flow as a picture first. The two diagrams below are reference maps you can keep coming back to while learning Linux.

Learning flow

Rendering diagram…

Architecture view

Rendering diagram…

Architecture & the boot process

When you first open Linux, the big picture matters more than individual commands. This section starts with the problems the concepts ahead were created to solve.

Linux is divided into the kernel, which controls the hardware directly, and user space, which sits on top and reaches the hardware only through the system calls the kernel provides. When an application opens a file or creates a socket, it is always the kernel that actually operates the disk or NIC, and the application just gets the result back through a system call. Once you understand this boundary, you start to see "which part of the kernel a given command touches", and it becomes much easier to see how the process, filesystem, and network sections that follow connect to each other.
Rendering diagram…
Rendering diagram…
ComponentRole
Firmware (BIOS/UEFI)Runs first when power comes on, does the initial hardware checks, and finds the bootloader
Bootloader (GRUB)Chooses which kernel to boot with which options — handles multi-boot and passing kernel parameters
KernelArbitrates every hardware resource: process scheduling, memory management, filesystems, networking, and more
init (PID 1)The first user space process the kernel runs — the ancestor of every later process

Tip

When a command behaves differently from what you expected, get into the habit of first asking "is this a kernel feature or the behavior of a user space tool?" and you will narrow problems down much faster — a permission problem, for example, is a kernel decision, whereas a syntax error in command options is a user space tool problem.

Filesystem hierarchy (FHS)

Here you look at Filesystem hierarchy (FHS) alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

Whatever the distribution, Linux follows the FHS (Filesystem Hierarchy Standard), a common rule that "this file belongs under this directory". Thanks to this rule, the sense of paths you learn on Ubuntu carries over almost unchanged to CentOS or Alpine, and because configuration files, logs, and executables do not get mixed up, automation scripts can be reused regardless of distribution.
Rendering diagram…
DirectoryPurposePractical tip
/etcDaemon and system configuration filesBefore changing configuration, always back up to .bak or version it with Git
/var/logApplication and system logsA logrotate configuration is essential to avoid a full disk
/procExposes running processes and kernel parameters as filesThe state of a specific process can be read directly from /proc/[PID]/status
/sysInformation on devices and drivers the kernel has detectedKernel parameters can be adjusted at runtime by changing sysfs values
/optStandalone software that does not follow the standard FHS pathsThe proper place for manually installed software not managed by the package manager

Tip

/proc and /sys are not files that really exist on disk but virtual filesystems the kernel generates in real time — merely reading them, as in cat /proc/cpuinfo, lets you look straight into the internal state of the kernel.

Permission & ownership model

Here you look at Permission & ownership model alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

Every file in Linux has read (r), write (w), and execute (x) permissions for each of three subjects: the owner, the owning group, and everyone else (other). When a process tries to access a file, the kernel applies only the one of these three that the process "matches first" — the point often missed in practice is that if you are the owner, only the owner permissions apply, however broad the group and other permissions are.
Rendering diagram…
BASH
# Change the owner/group
chown deploy:deploy /var/www/myapp
chgrp developers shared-folder/

# Change permissions — numeric (absolute) notation
chmod 755 script.sh     # rwxr-xr-x
chmod 644 config.yml     # rw-r--r--
chmod -R 750 /var/www/myapp   # apply recursively to the whole directory

# umask, which decides the default permissions of new files
umask                 # check the current value (e.g. 0022)
umask 0027            # files created from now on block group write and all access by others by default

# When fine-grained access control is needed — where standard rwx is not enough
setfacl -m u:alice:rx /var/www/myapp
getfacl /var/www/myapp
SymbolNumberMeaning (file)Meaning (directory)
r4Read the file contentsList the files in the directory (ls)
w2Modify the file contentsCreate and delete files in the directory
x1Run the file as a programEnter the directory (cd)
setuid (4000)-Runs with the privileges of the owner (e.g. passwd)Not applicable
setgid (2000)-Runs with the privileges of the owning groupNew files in the directory inherit the same group
sticky bit (1000)-Not applicableOnly you can delete your own files (e.g. /tmp)

Tip

umask specifies as a number not the "permissions to allow" but the "permissions to take away" — umask 0027 makes new files get created as 640 (rw-r-----), the default 666 (rw-rw-rw-) minus 027.

Essential commands

Here you look at Essential commands alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

A good share of server incidents is decided by how quickly you look at the logs and disk usage. Get into the habit of first finding old or large files with find/du and filtering logs in real time with grep/awk/sed, and the time to find the cause drops sharply.
BASH
# Files & directories
ls -lah          # detailed listing
find / -name "*.log" -mtime +7  # logs older than 7 days
du -sh /var/log/* | sort -hr    # sort by size
tail -f /var/log/nginx/access.log

# Text processing
grep -r "ERROR" /var/log --include="*.log"
awk '{print $1}' access.log | sort | uniq -c | sort -rn
sed -i 's/old/new/g' config.txt

# Apply a command to many files at once
find . -name "*.tmp" | xargs rm -f

Tip

A command that scans the whole root, like find / -mtime +7, can cause I/O load on a production server, so narrow the target directory before running it.

Process management & lifecycle

Here you look at Process management & lifecycle alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

Every process is born when an already running parent process clones itself with fork() and the clone is replaced by the program to actually run with exec(). So every process has a PID (its own number) and a PPID (the number of its parent), and following this lineage eventually leads to PID 1 (systemd). Checking which process holds a port and how much CPU/memory it uses is the first step of incident response.
Rendering diagram…
BASH
# Monitoring
top / htop
ps aux | grep nginx
ps -o pid,ppid,cmd -p 1234    # check the PID/PPID lineage
lsof -i :8080                 # process using the port

# Sending signals
kill -TERM 1234    # request a graceful exit (default)
kill -9 1234        # force kill (SIGKILL)
pkill -f "node server.js"

# Adjusting priority
nice -n 10 ./batch-job.sh      # start with low priority
renice -n 5 -p 1234             # change the priority of a running process
SignalDefault actionUse
SIGHUP (1)Terminate (daemons often redefine it as reload)Terminal hangup notice — nginx and others reload their configuration on this signal
SIGINT (2)TerminateCtrl+C — the user interrupts the foreground process
SIGTERM (15)Terminate (the process can intercept it and clean up)The default signal of kill — a request to "exit gracefully"
SIGKILL (9)Immediate forced termination (cannot be intercepted)The last resort when a process does not respond
SIGSTOP (19)Pause (cannot be intercepted)Stops a process, similar to Ctrl+Z

Tip

SIGTERM gives the process time to clean up (closing connections, deleting temporary files, and so on), whereas with SIGKILL the kernel removes the process immediately, so a transaction can be cut off midway — always try SIGTERM first and use a force kill as the last resort.

systemd & service management

Here you look at systemd & service management alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

systemd runs as PID 1 and manages the whole boot process and the service lifecycle afterward. Each service is declared as a "unit", and once the unit file states "what must be ready before it starts (After)" and "which target it belongs to (WantedBy)", systemd computes the dependency graph and boots as fast as it can, in parallel.
Rendering diagram…
/etc/systemd/system/myapp.serviceINI
[Unit]
Description=My Application
After=network.target postgresql.service
Requires=postgresql.service

[Service]
Type=simple
User=myapp
WorkingDirectory=/opt/myapp
ExecStart=/usr/bin/node /opt/myapp/server.js
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
BASH
# Apply after writing the unit file
systemctl daemon-reload

# Register for automatic start at boot + run now
systemctl enable --now myapp

# Check the status & logs
systemctl status myapp
journalctl -u myapp -f --since "1 hour ago"

# Run in the background (for temporary debugging — unsuitable for production services)
nohup ./server &
tmux new -s work
DirectiveMeaning
After=Units that must start before this one (this unit still tries to start if they fail)
Requires=Units this unit depends on — if a dependency fails, this unit stops too
Restart=on-failureRestart automatically on abnormal exit
WantedBy=multi-user.targetRegisters it to start along with this target (enable creates a symbolic link)

Tip

A service registered with systemctl enable --now comes back automatically after a reboot, but a process started with nohup is gone after a reboot — always register production services as unit files.

Network stack & firewall

Here you look at Network stack & firewall alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

When a service does not respond, first check whether the port is really open and whether a firewall is blocking the traffic. A packet entering the kernel passes through several netfilter chains in order, and iptables is the tool for attaching rules to each chain to accept (ACCEPT), drop (DROP), or translate (NAT) packets.
Rendering diagram…
BASH
# Check connectivity
ss -tlnp          # list listening ports
curl -v https://api.example.com
nc -zv host 443   # test a port connection

# iptables (firewall) — matched in order from the top
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -j DROP    # block everything not explicitly listed (add only after allowing SSH)

# Traffic analysis
tcpdump -i eth0 port 80 -w capture.pcap
ChainWhen the packet passes through
PREROUTINGAfter the packet arrives, before the routing decision (used for DNAT in port forwarding)
INPUTPackets destined for this host itself
FORWARDPackets passing through this host to another host (when acting as a router or NAT gateway)
OUTPUTPackets generated on this host and going out
POSTROUTINGJust before the packet actually leaves (used for SNAT/MASQUERADE)

Tip

iptables rules are reset on reboot, so save them with a tool such as iptables-persistent, and before applying the final DROP rule always confirm that you allowed the SSH port (22) first — do it in the reverse order and your remote server access is cut off on the spot.

Storage (LVM) & memory/swap

Here you look at Storage (LVM) & memory/swap alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

A physical disk is divided into partitions, and layering LVM (Logical Volume Manager) on top lets you pool several disks into one storage pool and grow volume sizes flexibly even while mounted. Memory, too, is split between the "virtual memory" a process sees and the actual "physical memory (RAM)", so the kernel responds automatically when RAM runs short.
Rendering diagram…
Rendering diagram…
BASH
# Disk & mount overview
lsblk                 # view the block device tree
df -h                 # usage of mounted filesystems

# LVM — from creating the PV/VG/LV to online expansion
pvcreate /dev/sdb
vgcreate data-vg /dev/sdb
lvcreate -L 50G -n data-lv data-vg
mkfs.ext4 /dev/data-vg/data-lv
mount /dev/data-vg/data-lv /data

# Expand capacity with no service interruption
lvextend -L +20G /dev/data-vg/data-lv
resize2fs /dev/data-vg/data-lv

# Check memory & swap
free -h
swapon --show
vmstat 1 5   # 5 samples at 1-second intervals — si/so columns that stay non-zero mean heavy swap use
free -h fieldMeaning
availableMemory a new process can really use right away (including reclaimable cache) — judge free memory by this value
buff/cacheCache the kernel uses temporarily to speed up file I/O — reclaimed at once when needed, so do not mistake it for "in use"
swap usedThe total pages pushed out to disk for lack of physical memory — steady growth is a sign to add memory

Tip

The buff/cache figure in free -h is an area the kernel can reclaim immediately, so it is effectively free memory — before concluding "memory is full", always check the available column.

Logging system (journald)

Here you look at Logging system (journald) alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

On systemd-based distributions, the standard output of services (stdout/stderr) and kernel messages all collect in journald and are stored in a binary format. Unlike text log files, journald is structured with metadata such as the unit name, priority, and timestamp, so instead of grep you can pull out exactly the logs you want with the filter options of journalctl.
Rendering diagram…
BASH
# Follow the logs of one specific service in real time
journalctl -u myapp -f

# The last hour, ERROR and above only
journalctl -u myapp --since "1 hour ago" -p err

# Kernel messages since boot
journalctl -k -b

# Set a cap on the disk space journald uses
# /etc/systemd/journald.conf
# SystemMaxUse=500M
/etc/logrotate.d/myappTEXT
/var/log/myapp/*.log {
    daily
    rotate 14
    compress
    delaycompress
    missingok
    notifempty
    postrotate
        systemctl reload myapp > /dev/null 2>&1 || true
    endscript
}

Tip

By default journald keeps accumulating logs up to a set percentage of disk capacity, so unless you set SystemMaxUse explicitly, logs can fill the disk when traffic surges and lead to a service outage.

Security hardening

Here you look at Security hardening alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

A Linux server in its default installed state often has root password login open and unnecessary services running. Locking down just three things properly — SSH, sudo, and the firewall — stops most brute force attacks from automated scanners, and blocking repeated failures automatically with a tool such as fail2ban means nobody has to watch the logs all the time.
/etc/ssh/sshd_config (excerpt)TEXT
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
AllowUsers deploy admin
Port 22
/etc/fail2ban/jail.localINI
[sshd]
enabled = true
port = 22
maxretry = 5
bantime = 3600
findtime = 600
BASH
# Grant least privilege per command in sudoers
echo 'deploy ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart myapp' \
  > /etc/sudoers.d/deploy-myapp
visudo -c    # validate the syntax before applying

# Check the SELinux status (RHEL family)
getenforce
sestatus
ItemRisk in the default stateRecommended action
SSH root loginAnyone who knows the password can log in directly as rootPermitRootLogin no + allow key-based authentication only
SSH password authenticationExposed to brute-force attacksPasswordAuthentication no, switch to public key authentication
sudo privilegesA user can run every command with root privilegesGrant only the needed commands with least privilege in /etc/sudoers.d/
Repeated login failuresAutomated bots can keep trying indefinitelyUse fail2ban to block the IP automatically after a set number of failures
Limits of the DAC permission modelOnce root is breached, unlimited access to the whole systemFurther restrict the reach of each process with SELinux/AppArmor (MAC)

Tip

DAC (rwx permissions) only ever controls "who can touch this file" — MAC (mandatory access control) such as SELinux/AppArmor adds another line of defense: "even if root is breached, this process cannot touch anything outside this directory".

Performance diagnosis & troubleshooting

Here you look at Performance diagnosis & troubleshooting alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

The single symptom "the server is slow" does not lead straight to a cause. A systematic approach — checking the three resources CPU, memory, and disk I/O in turn to narrow down where the bottleneck is — is far faster than checking this and that by feel.
Rendering diagram…
BASH
uptime                 # check the load average
vmstat 1 5              # 5 samples at 1-second intervals — watch the r and si/so columns
iostat -x 1 5           # %util and await per disk
sar -n DEV 1 5          # network interface traffic
mpstat -P ALL 1 5       # CPU usage per core (reveals a single core stuck at 100%)
ToolKey values to watchInterpretation
uptimeload average (1/5/15 minutes)Consistently above the CPU core count signals a CPU shortage
vmstat 1r (run queue), si/so (swap in/out)r above the core count or non-zero si/so mean CPU or memory pressure respectively
iostat -x 1%util, await%util near 100% with a high await means the disk is the bottleneck
sar -n DEV 1rxkB/s, txkB/sShows whether the NIC bandwidth is saturated

Tip

The load average is the average "number of processes running or waiting to run" — with 4 cores and a load average steadily at 8 or more, twice as much work is queued up as can be handled right now.

Kernel foundations of containers

Here you look at Kernel foundations of containers alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

Docker and Kubernetes may look like magic that creates containers, but they are really a combination of two Linux kernel features — namespaces isolate the PIDs, network, and mount list a process sees, and cgroups limit the total CPU, memory, and I/O a process (group) can use. Understanding these two makes it clear what docker run --memory and Kubernetes resource limits actually configure under the hood.
Rendering diagram…
BASH
# Run a shell in new PID/network/mount namespaces — experience container isolation firsthand
unshare --pid --net --mount --fork /bin/bash
ps aux   # inside this shell, only it is visible, near PID 1

# Set a memory cap on a process group directly with cgroup v2
mkdir /sys/fs/cgroup/mygroup
echo $$  > /sys/fs/cgroup/mygroup/cgroup.procs      # move the current shell into this group
echo 100M > /sys/fs/cgroup/mygroup/memory.max        # 100MB memory cap for the whole group

# docker run --memory=100m does the same thing internally:
# it puts the container process in a cgroup and sets memory.max.

Tip

A container is not a "lightweight VM" but an ordinary Linux process isolated by namespaces and limited by cgroups — which is why running ps aux on the host shows the processes inside containers as well. Practical container orchestration continues in the docker and kubernetes guides.

Shell scripting

Here you look at Shell scripting alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.

Repetitive deploy and backup tasks should be turned into shell scripts, to remove the room for mistakes that comes with running them by hand. set -euo pipefail stops the script the moment an error occurs, preventing the commands after a failed step from carrying on in a bad state.
deploy.shBASH
#!/bin/bash
set -euo pipefail  # exit immediately on error

APP_DIR="/var/www/myapp"
BACKUP_DIR="/var/backups"

log() { echo "[$(date +%F %T)] $*"; }

cleanup() {
  log "Running cleanup (always runs, on success or failure)"
}
trap cleanup EXIT

# Deployment script
main() {
  log "Starting deployment..."
  cp -r "$APP_DIR" "$BACKUP_DIR/$(date +%Y%m%d%H%M%S)"
  git -C "$APP_DIR" pull origin main
  systemctl restart myapp
  log "Deployment complete"
}

main "$@"

Tip

With trap cleanup EXIT in place, the cleanup function always runs whether the script exits normally or fails midway because of set -e, so housekeeping such as removing temporary files and releasing locks is never skipped.

Linux practical design

Linux practical design is a point where the options diverge. Using the table to compare what each approach is for and how it differs in operation makes later decisions much easier.

The key to Linux operations is understanding the process, file, network, and permission models rather than memorizing commands.
Decision pointQuestion to askPractical guideline
BoundariesWhich parts of the Linux code are most likely to change?Separate input/output, configuration, external integrations, and the core rules.
StateWhere is state created and where does it go away?Make the owner and lifecycle of state visible in the code.
FailureWhat does the caller receive on failure?Decide the timeout, fallback, and error contract first.

Linux operating standards

This section covers Linux operating standards from a practical perspective. Instead of memorizing the concept, focus on the situations in which you would reach for it.

Look at CPU load, memory pressure, disk I/O, network sockets, and systemd service state together.

Tip

  • systemd status
  • journal logs
  • resource pressure
  • rollback command

Linux verification strategy

Linux verification strategy is a point where the options diverge. Using the table to compare what each approach is for and how it differs in operation makes later decisions much easier.

Operational work should include a runbook, rollback commands, a dry-run, and an audit log.
Quality axisHow to verifyDefinition of done
CorrectnessAutomate the normal/failure cases.The core scenarios pass reproducibly.
Regression preventionWhen fixing a bug, leave the same case behind as a test.The same failure is not deployed again.
OperabilityCheck the logs, metrics, and alerts.There is a path for tracing the cause when a problem occurs.

Linux: frequently asked questions

Do developers really need to know Linux?

Most servers, containers, and CI/CD pipelines run on Linux, so it pays to know the basic commands and layout. When a deployed application misbehaves, you end up logging in to a server and looking at processes, logs, disks, and the network. Working with files and directories, permissions, processes, and logs covers most situations.

How do I fix a "Permission denied" error?

First check the owner and permissions of the file with ls -l. If a script will not run, give it execute permission with chmod +x filename. If the file belongs to another user, change the owner with chown, or run the command with sudo for system files. Opening everything with chmod 777 creates security problems, so grant only the permissions that are needed.

How do I find out which process is using a port?

ss -ltnp or lsof -i :PORT shows the process and PID listening on the port. When you see "address already in use", find the process this way and, if it is not needed, stop it with kill PID. You need sudo to see details of processes owned by other users.

What should I check when the disk is full?

Use df -h to see which partition is full, then walk down the large directories with du -sh directory/*. On servers the cause is often log files, Docker images and volumes, or package caches. Rotate logs with logrotate, and for Docker check usage with docker system df and remove resources that are no longer used.

← Previous guideDevOps Intro & RoadmapNext guide →Docker