Linux Basics for SRE, DevOps & Cloud

// article

The filesystem map: where everything lives

10 min

One tree, everything attached

/               the root — everything hangs here (no C:\ drives)
├── home/       user directories (yours: /home/student, alias ~)
├── etc/        CONFIGURATION — nginx, ssh, cron, everything
├── var/log/    LOGS — your first stop in every incident
├── tmp/        scratch space, cleared on reboot
├── usr/bin/    the programs themselves
├── proc/       a window into the kernel (cpuinfo, meminfo — not real files)
└── opt/, srv/  third-party apps and served data

Burn in the ops trio: /etc (how things are configured), /var/log (what happened), /proc (what's true right now).

Moving around

pwd                 where am I?
ls                  what's here?
ls -la              …including hidden files, with permissions and sizes
cd /var/log         go somewhere absolute
cd ..               up one level
cd ~   (or just cd) home
cd -                back to where I just was

Paths: absolute vs relative

/etc/nginx/nginx.conf     absolute — starts at /, works from anywhere
nginx/nginx.conf          relative — resolved from your current directory
./deploy.sh               relative, explicitly "right here"

Scripts and cron jobs run from unpredictable directories — production scripts use absolute paths. This single habit prevents a whole category of "works on my machine" failures.

Finding things

find /etc -name "*.conf"       find by name under a directory
find ~ -name "*.yaml"
which nginx                    where does a command live?
tree                           visualize the hierarchy

Sign in to track progress.