Intro to systemd

Outcome Understand why PID 1 (“mommy process”) owns every orphan on the box Recall the SysV init flow & its pain points Know what systemd bundles and why nerds argue about it PID 1 — the mommy process Starts first in the kernel’s user-space hand-off → gets PID 1 Every other process is its child, grandchild, or further down the tree If a parent dies, PID 1 adopts the orphan so its exit status can be reaped (prevents zombies) Zombie = process finished execution but still holds a slot in the table; init uses wait() to clean it up SysV init (a.k.a. Sys5 or “classic init”) ...

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

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

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