Introduction to Linux Filesystem

Linux Filesystem cheatsheet Dir What’s in there Quick vibe /etc System-wide config (fstab, ssh/, apt/…) Brain – tweak here, bend the OS /bin Core binaries (ls, cp, bash) First-aid toolkit; always present, even in rescue mode /sbin Sysadmin binaries (mount, ip, systemctl) Same as /bin but root-only toys /usr/bin Full app set (gcc, python) Userland galaxy – 90 % of commands /usr/sbin Heavier daemons (sshd, cron) Admin apps still in userland /usr/local Locally compiled stuff Keeps your builds safe from the distro’s package manager /var Logs, spool, caches, DB files Growing stomach – watch disk usage /run (/var/run) Volatile runtime state (PIDs, sockets) tmpfs in RAM, born early at boot /home Users’ dirs You, your dotfiles, your mess /opt 3rd-party bundles (Chrome, VMware) Vendor playground; easy to nuke /dev Device nodes (/dev/sda, /dev/null) “Everything’s a file” made real /proc Kernel + process pseudo-FS cat /proc/cpuinfo = free hardware probe /sys Kernel objects, drivers Modern cousin of /proc; tweak power/LEDs /tmp Scratch space Auto-purged; don’t stash secrets /boot Kernel & bootloader bits (vmlinuz, grub/) Small, often its own partition Why the weird names? usr ≠ “user” originally—Unix System Resources (/usr/bin). sbin = system binaries (super-user land). opt from optional add-ons in SVR4 days. run split from /var so early-boot services get instant writable RAM. Quick cross-OS compare OS Root Apps live in User homes Mount style 🐧 Linux/*BSD / /usr/bin, /opt /home/ivan Any device mounts anywhere (/mnt/usb) via fstab macOS / /Applications (GUI), /usr/bin (CLI) /Users/ivan External drives auto-mount under /Volumes Windows C:\ C:\Program Files / Program Files (x86) C:\Users\Ivan Letters (D:\, E:\) instead of grafting into a single tree Handy aliases & shortcuts ~ → home dir (/home/ivan, /Users/ivan). . = current dir, .. = parent. /var/run → symlink to /run on modern distros. /bin & /sbin often symlink to /usr/bin & /usr/sbin (the usr-merge trend). Mounting in one breath Linux glues extra filesystems into the tree: mount /dev/sdb1 /media/usb macOS auto-mounts to /Volumes/DriveName, Windows splits the forests into drive letters. ...

June 29, 2025 · 2 min · 355 words · Ivan Goncharuk

Pocket-Docs Site: quick start

My private documentation site setup guide Outcome Local wiki/blog at ~/vault, one command on or off. Edits show up live the second you hit save. Git keeps history & lets friends add stuff. Pushes auto-build to Netlify so you can read it anywhere without opening ports. This one-time setup should take approx 3 min Install Hugo If you haven’t already installed Hugo on your system, use your own apropriate package manager. ...

June 29, 2025 · 3 min · 519 words · Ivan Goncharuk

Unix Permissions Cheat-Sheet

Outcome Understand how rwx maps to octal digits. Set, fix, and audit permissions quickly using: chmod chown setfacl Remember what SUID / SGID / sticky and ACL do without Googling. Permissions Basics Octal Symbolic Meaning 0 --- No rights 1 --x Execute only 2 -w- Write only 3 -wx Write + Execute 4 r-- Read only 5 r-x Read + Execute 6 rw- Read + Write 7 rwx Read + Write + Execute Mnemonic: 421 $\rightarrow$ rwx ...

June 29, 2025 · 2 min · 391 words · Ivan Goncharuk