Ravindra BagaleCourses & study guides मराठी Track your progress

AWS Cloud

Linux File System Hierarchy (FHS) Explained: /etc, /var, /usr, /proc and More

On Windows you have C:\ and D:\. On Linux there is only one tree. It starts at / (root). Every file, disk, USB drive and even running process sits somewhere under /. Once you know which folder holds what, you will never feel lost on a server.

In this chapter

  • Why Linux has a single tree starting at /
  • What lives in /etc, /var, /home, /usr, /opt, /tmp, /boot, /dev
  • The virtual folders /proc and /sys
  • Where logs, configs and binaries go
  • Absolute vs relative paths
  • How disks are mounted into the tree

1. An everyday example: a big housing society

In a housing society in Kothrud there is one main gate. Inside, the office keeps rules and records. The parking holds vehicles. Each flat belongs to one family. The store room holds shared tools. Nobody keeps cars in the office.

Main gate = /. Office with rules = /etc. Records that keep growing = /var. Flats = /home/. Shared tools = /usr/bin. Outside contractors = /opt. Guest room cleaned daily = /tmp. Electric meter board (live readings) = /proc and /sys.

Finding a file in the tree/ (root)/etc (config)/etc/nginx/etc/nginx/nginx.conf
A path is a walk from / down the tree.

2. The root / and the FHS standard

If every distro put files in random places, no script or person could work across servers. A shared map is needed.

The Filesystem Hierarchy Standard (FHS) says which top folder holds what. Everything starts at /. Note: / is the root of the tree. /root is the home folder of the root user. They are different.

FolderHoldsExample
/bin, /sbinBasic commands (now links to /usr)ls, ip
/etcSystem config files/etc/ssh/sshd_config
/homeUsers' personal folders/home/meera
/rootroot user's home/root/.bashrc
/varChanging data: logs, caches, mail, databases/var/log/syslog
/tmpTemporary files, cleaned often/tmp/upload123
/usrInstalled programs and libraries/usr/bin/python3
/optAdd-on vendor software/opt/splunk
/bootKernel, initramfs, GRUB/boot/vmlinuz-*
/devDevice files/dev/sda, /dev/null
/proc, /sysLive kernel info (virtual)/proc/cpuinfo
/mnt, /mediaMount points for disks and USB/mnt/backup
/srvData served by this host/srv/www
/runRuntime data since boot (PID files, sockets)/run/sshd.pid
  1. List the top of the tree.
ls /

Output:

bin  boot  dev  etc  home  lib  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var

These are the standard FHS folders.

  1. See it as a tree one level deep.
tree -L 1 /

Output:

/
├── bin -> usr/bin
├── boot
├── etc
...

bin is a link to usr/bin on new distros.

  1. Read the built-in manual on the layout.
man hier

Output:

HIER(7)  Linux Programmer's Manual
NAME  hier - description of the filesystem hierarchy

man hier explains each folder.

3. /etc: the configuration office

You change how a service behaves by editing its config. You must know where configs live.

/etc holds text config files for the system and services: users (/etc/passwd), groups, hosts, DNS (/etc/resolv.conf), mounts (/etc/fstab), SSH, cron, nginx and more. No binaries go here.

  1. See the user list file.
head -3 /etc/passwd

Output:

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin

Each line: user, UID, GID, home, shell.

  1. See the local name lookup file.
cat /etc/hosts

Output:

127.0.0.1 localhost
10.0.1.20 db01.internal db01

db01 resolves to 10.0.1.20 without DNS.

  1. See DNS servers.
cat /etc/resolv.conf

Output:

nameserver 127.0.0.53
search ap-south-1.compute.internal

DNS goes to the local resolver first.

  1. Back up a config before editing.
sudo cp -a /etc/ssh/sshd_config /etc/ssh/sshd_config.bak.$(date +%F)

A dated copy lets you roll back.

4. /var: data that keeps changing

Logs and caches grow every minute. If they fill the disk, services crash. You must know where to look.

/var (variable) holds /var/log (logs), /var/cache (package caches), /var/lib (state of apps and databases, like /var/lib/mysql and /var/lib/docker), /var/spool (print and mail queues) and /var/www (web files on many distros).

  1. See the log folder.
ls /var/log

Output:

auth.log  cloud-init.log  dpkg.log  journal  nginx  syslog

auth.log = logins. syslog = general. nginx = web logs.

  1. Find which /var folder is biggest.
sudo du -sh /var/* 2>/dev/null | sort -h | tail -3

Output:

120M /var/cache
1.1G /var/log
6.4G /var/lib

/var/lib is biggest (Docker or a database).

  1. Follow a log live.
sudo tail -f /var/log/nginx/access.log

Output:

10.0.0.5 - - [25/Oct/2026:10:40:01 +0530] "GET / HTTP/1.1" 200 612

Each new request appears. Ctrl+C to stop.

5. /home, /root, /usr, /opt, /tmp

You need to know where your own files go, where programs are installed and where it is safe to put scratch files.

/home/ is each user's space; ~ is a short name for it. /usr holds programs installed by the package manager (/usr/bin, /usr/lib, /usr/share). /usr/local is for things you compile yourself. /opt is for big vendor apps. /tmp is shared scratch space, often cleared at reboot.

  1. Go home and print where you are.
cd ~ && pwd

Output:

/home/meera

~ means /home/meera for user meera.

  1. Find where a program is installed.
command -v nginx

Output:

/usr/sbin/nginx

Package-installed admin tools go to /usr/sbin.

  1. Check /tmp permissions (sticky bit).
ls -ld /tmp

Output:

drwxrwxrwt 18 root root 4096 Oct 25 10:00 /tmp

t at the end = sticky bit. Everyone can write, but only owners can delete their own files.

  1. Make a safe temp file.
mktemp

Output:

/tmp/tmp.k3J9aQ2xZb

A unique name avoids clashes with other users.

6. /dev: devices as files

Linux treats almost everything as a file. Disks, terminals and even 'nothing' have a file name. Tools can read and write them like normal files.

/dev holds device files: /dev/sda or /dev/nvme0n1 (disks), /dev/sda1 (partition), /dev/tty (terminal), /dev/null (a black hole), /dev/zero (endless zeros), /dev/random and /dev/urandom (random bytes).

  1. List block devices.
lsblk

Output:

NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
nvme0n1     259:0    0   20G  0 disk
└─nvme0n1p1 259:1    0   20G  0 part /
nvme1n1     259:2    0  100G  0 disk /data

Two disks. The second is mounted at /data.

  1. Throw away output with /dev/null.
ls /nope 2>/dev/null; echo done

Output:

done

The error went into the black hole.

  1. Create a 100 MB test file from /dev/zero.
dd if=/dev/zero of=/tmp/test.img bs=1M count=100

Output:

100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 0.1 s

Useful for disk speed tests.

7. /proc and /sys: live windows into the kernel

You want CPU info, memory, process details and kernel settings without special tools.

/proc and /sys are virtual. Nothing is on disk; the kernel makes the content when you read it. /proc has one folder per process (/proc/) plus files like cpuinfo, meminfo, loadavg. /proc/sys holds tunable settings (sysctl). /sys shows devices, drivers and power in a tree.

  1. CPU model.
grep -m1 'model name' /proc/cpuinfo

Output:

model name : Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz

Read straight from the kernel.

  1. Free memory.
grep -E 'MemTotal|MemAvailable' /proc/meminfo

Output:

MemTotal:        3969436 kB
MemAvailable:    3101220 kB

About 3 GB of 4 GB is available.

  1. Look inside a process folder.
cat /proc/1/comm; ls -l /proc/self/cwd

Output:

systemd
lrwxrwxrwx 1 meera meera 0 Oct 25 10:45 /proc/self/cwd -> /home/meera

Process 1 is systemd. self = the current process.

  1. Read and change a kernel setting.
cat /proc/sys/net/ipv4/ip_forward; sudo sysctl -w net.ipv4.ip_forward=1

Output:

0
net.ipv4.ip_forward = 1

IP forwarding is now on (until reboot; save it in /etc/sysctl.d/ to keep it).

  1. Check a disk's scheduler in /sys.
cat /sys/block/nvme0n1/queue/scheduler

Output:

[none] mq-deadline

The active value is in brackets.

8. Paths and mounts: how disks join the tree

A path describes where to find something in the directory tree. A mount makes a file system appear at a directory in that tree. For example, /data may be a directory on the root file system until a separate disk is mounted there. The old directory contents are hidden by the mount, while a program writing under the path now reaches the attached file system.

Compare findmnt -T /var and df -h /var on your lab machine. The first command identifies the file-system mount that contains the path. The second reports its space usage. If both / and /var show the same source, they are using the same file system. If /var is on a different mount, its free space can differ from root even though the path starts with /.

A new 100 GB disk is useless until it appears somewhere in the tree.

An absolute path starts with / (like /var/log/syslog). A relative path starts from where you are (like logs/app.log). . is here, .. is one up. Mounting attaches a disk's file system to a folder (a mount point). /etc/fstab makes mounts permanent.

  1. Relative path walk.
cd /var/log && cd ../lib && pwd

Output:

/var/lib

From /var/log, .. goes to /var, then into lib.

  1. See what is mounted where.
findmnt -t ext4,xfs

Output:

TARGET SOURCE         FSTYPE OPTIONS
/      /dev/nvme0n1p1 xfs    rw,noatime
/data  /dev/nvme1n1   ext4   rw,relatime

Root is xfs. /data is a separate ext4 disk.

  1. Mount a new disk.
sudo mkfs.ext4 /dev/nvme2n1 && sudo mkdir -p /backup && sudo mount /dev/nvme2n1 /backup && df -h /backup

Output:

Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme2n1     50G   24K   47G   1% /backup

The disk now lives at /backup.

  1. Make it permanent with UUID.
echo "UUID=$(sudo blkid -s UUID -o value /dev/nvme2n1) /backup ext4 defaults,nofail 0 2" | sudo tee -a /etc/fstab && sudo mount -a

Output:

UUID=9b2e... /backup ext4 defaults,nofail 0 2

UUIDs do not change when disk names change.

9. Real examples from many industries

The same Linux skill shows up in every kind of company. Seeing it in many places helps you remember it.

Each row is a made-up team. It shows who uses this and how.

Team and cityHow they use itCommand
Rohan, DevOps, PuneCleans /var/log when disk hits 90%du -sh /var/log/*
Sophie, web agency, ParisKeeps sites in /var/www and configs in /etc/nginxls /etc/nginx/sites-enabled
Imran, database team, KarachiMounts a fast disk on /var/lib/postgresqlfindmnt /var/lib/postgresql
Hana, SRE, SeoulTunes TCP through /proc/syssysctl net.core.somaxconn
Diego, analytics, Mexico CityInstalls a vendor tool in /optls /opt
Neha, security, GurugramWatches /var/log/auth.log for failed loginsgrep 'Failed password' /var/log/auth.log
Oliver, ML, LondonReads GPU info from /sys and /procls /sys/class/drm

10. Common errors and how to fix them

Everyone hits these errors. Knowing the cause saves hours.

Read the exact message first. Then match it to a row below.

Error you seeWhy it happensHow to fix
No space left on deviceA partition (often / or /var) is fullFind big folders and clean logs or caches.
sudo du -xh / --max-depth=2 | sort -h | tail
No space left on device (but df shows free space)Inodes are used up by millions of tiny filesCheck inodes and delete the small files.
df -i
cd: /Var/log: No such file or directoryLinux paths are case sensitiveUse the exact case.
cd /var/log
mount: /backup: mount point does not exist.The folder is not createdCreate it first.
sudo mkdir -p /backup
mount: /data: wrong fs type, bad option, bad superblockDisk has no file system yet or wrong typeCheck with lsblk -f, format only if new.
lsblk -f
umount: /data: target is busy.A process is using files on it, or you are inside itcd out and find the process.
sudo lsof +f -- /data
Permission denied (writing in /etc)Only root can change system configsUse sudo, or sudo tee for redirects.
echo x | sudo tee -a /etc/hosts
sysctl: permission denied on key 'net.ipv4.ip_forward'sysctl -w needs rootAdd sudo.
sudo sysctl -w net.ipv4.ip_forward=1
rm: cannot remove '/proc/1/status': Operation not permitted/proc is virtual and read-onlyDo not try to delete in /proc or /sys.

11. Troubleshooting step by step

Most file-system issues are 'disk full', 'file not found' or 'mount failed'. Check them in this order.

Go top to bottom. Stop at the first step that shows the problem.

  1. Check free space per mount.
df -h
  1. Check free inodes.
df -i
  1. Find the biggest folders on that mount only.
sudo du -xh /var --max-depth=1 | sort -h
  1. Find deleted files still held open.
sudo lsof +L1
  1. Check the mount table.
findmnt
  1. Compare fstab with real UUIDs.
blkid; cat /etc/fstab

12. Lab 1: Disk-full fire drill

At Leela Travels in Goa, the website stops. df shows / at 100%. Find and fix it.

A full hands-on lab. Run every step on a test Linux machine (an EC2 instance, a VM, or WSL).

  1. Confirm.
df -h /

Output:

/dev/nvme0n1p1  20G   20G     0 100% /
  1. Find the big folder.
sudo du -xh / --max-depth=1 2>/dev/null | sort -h | tail -3

Output:

1.9G /usr
2.4G /home
14G /var
  1. Go deeper.
sudo du -xh /var --max-depth=2 | sort -h | tail -2

Output:

13G /var/log
13G /var/log/app
  1. See the files.
ls -lhS /var/log/app | head -3

Output:

-rw-r--r-- 1 app app 12G Oct 25 10:50 debug.log
  1. Empty it safely (the app keeps the file open).
sudo truncate -s 0 /var/log/app/debug.log
  1. Verify.
df -h /

Output:

/dev/nvme0n1p1  20G  7.1G   13G  36% /
  1. Prevent it: add logrotate.
printf '/var/log/app/*.log {\n daily\n rotate 7\n compress\n missingok\n copytruncate\n}\n' | sudo tee /etc/logrotate.d/app

13. Lab 2: Tour the tree like an auditor

Answer five audit questions using only FHS knowledge.

A full hands-on lab. Run every step on a test Linux machine (an EC2 instance, a VM, or WSL).

  1. Which users can log in with a shell?
grep -v nologin /etc/passwd | cut -d: -f1

Output:

root
meera
ec2-user
  1. Which DNS server is used?
grep nameserver /etc/resolv.conf

Output:

nameserver 10.0.0.2
  1. Which vendor apps are installed?
ls /opt

Output:

aws  splunkforwarder
  1. How many CPUs?
grep -c ^processor /proc/cpuinfo

Output:

2
  1. Who logged in recently?
sudo grep 'Accepted' /var/log/auth.log | tail -2

Output:

Accepted publickey for meera from 49.36.10.4 port 51022 ssh2

Ravindra Bagale's Tip

Remember three folders: config in /etc, logs in /var/log, your work in /home. That covers 80% of what you will touch on a server.

14. Frequently asked questions

Q. What is the difference between / and /root?

/ is the top of the tree. /root is the home folder of the root user.

Q. Why is /bin a link to /usr/bin?

The 'usrmerge' change. Modern distros keep all programs in /usr and keep /bin as a link for old scripts.

Q. Is it safe to delete files in /tmp?

Old files, yes. Files in use by running programs, no. Let systemd-tmpfiles clean it.

Q. Does /proc use disk space?

No. It is created by the kernel in memory.

Q. Where should I install my own app?

Packaged: /usr. Self-built: /usr/local. Big vendor bundle: /opt. Data: /srv or /var/lib/.

15. Interview questions and answers

Beginner level

Q. What is stored in /etc?

Configuration files.

Q. Where are logs?

/var/log.

Q. What is ~?

Your home folder, like /home/meera.

Q. Absolute vs relative path?

Absolute starts with /. Relative starts from the current folder.

Mid level level

Q. What is /proc?

A virtual file system made by the kernel showing processes and kernel data.

Q. /usr/local vs /opt?

/usr/local for locally built software split into bin/lib. /opt for self-contained vendor packages.

Q. df shows full but du shows less. Why?

A deleted file is still open by a process. Find it with lsof +L1 and restart the process.

Q. What is the sticky bit on /tmp?

Everyone can write, but only the owner can delete their files.

Senior level

Q. Why put /var on a separate partition?

Logs or a database can fill it without filling / and crashing the OS.

Q. How do you make a sysctl change permanent and safe?

Put it in /etc/sysctl.d/99-name.conf, apply with sysctl --system, test on canary, manage it with config management.

Q. Inodes are full. What do you do long-term?

Find the app that writes many small files, add cleanup, or recreate the file system with more inodes (mkfs.ext4 -N) or use xfs.

Q. Why are fstab UUIDs better than /dev/sdb?

Device names can change between boots or instance types. UUIDs stay with the file system.

Try at home

  1. Run ls / and write one line about each folder.
  2. Find your CPU model from /proc/cpuinfo.
  3. Run df -h and df -i and compare.

Ask what owns the file or mount

Use stat and findmnt to distinguish an ordinary /etc config file from generated data under /proc. Inspect /var/log and package-owned files without editing them. Check whether /bin is a symlink on the distribution before assuming a separate tree.

Interview check Why does /proc look like a directory but behave differently?

It is a virtual filesystem exposing kernel and process information, so many entries do not behave like stored ordinary files.

Reference documentation

Practise this chapter

Interview questions and answers

Why can a server say the log directory is full when the root file system still has space?

The log directory can be on a separate mount with its own available space. I would use findmnt with the log path to see the backing file system and df with that same path. Then I would investigate growth or cleanup on the actual full volume.

Check your understanding

Choose an answer, then compare your reasoning with the explanation.

0 of 3 answered correctly
1. How do you identify which file system contains /var on the current host?

Answer and explanation

B. Run findmnt -T /var

The target-path option resolves which mount contains the path.

2. What can happen to a directory’s existing files when another file system is mounted there?

Answer and explanation

A. They are hidden while the mount is present

The mount covers the old directory view. Its data remains on the original file system.

3. Can /var have different free space from root?

Answer and explanation

A. Yes, if /var uses a separate file system

Free space belongs to the mounted file system and need not be shared with root.

Practice Tasks

Practice checks run in your browser. They check the answer for this exercise; they do not create resources or connect to your AWS account.

About this scenario

London Legal LLP is a law business in London. Oliver Hughes looks after its IT and cloud work. They count money in GBP and run their AWS resources in the eu-west-2 Region. In the tasks below you do real jobs for them using what this lesson teaches. All names, account IDs, IP addresses and numbers are made up for practice.

0 / 16

Easy List the top of the tree

Know the top folders.

List the very top of the file system with type markers (a slash after each folder).

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy Read the hosts file

Local name overrides live here.

Show only the line for host db01 in the local hostname-to-IP file on the London Legal LLP server.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy Check DNS servers

Package installs fail without DNS.

Count how many nameserver lines the London Legal LLP server's resolver config has.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy Free space per mount

First step in any disk-full alert.

Show disk usage of the file system that holds /var, in human-readable sizes.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy Read CPU info

/proc is the kernel window.

Print the full CPU information file from the kernel.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy Read memory info

See RAM without extra tools.

Print the kernel memory information file.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy List block devices

See disks and partitions.

List only the disk /dev/xvdf and its partitions.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy See the mount table

Shows what is mounted where.

Show only the mount entry for /data.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy Follow a log

Watch requests live.

Follow /var/log/nginx/error.log live as new lines arrive.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Easy Where are configs?

Know where to look.

In which top-level folder does Oliver Hughes find SSH and nginx config files? Type the path.

  1. Write down the numbers the task gives you.
  2. Work it out step by step on paper.
  3. Type only the final answer in the box.
  4. Click Check answer.

Easy Where are logs?

First stop in troubleshooting.

Type the standard folder path where system and app logs are kept.

  1. Write down the numbers the task gives you.
  2. Work it out step by step on paper.
  3. Type only the final answer in the box.
  4. Click Check answer.

Medium Check inode usage

Disk can be full of tiny files.

London Legal LLP's server says no space left but df -h shows free GB. Show inode usage of /var/lib/docker.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Medium Size of /var/log

Logs are the usual suspect.

Show the total size of /var/log in human-readable form.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Medium Create a mount point

A disk needs an empty folder to mount on.

Create the folder /mnt/londonlegal-backup to mount a new disk. Use admin rights.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Medium Mount a disk

Attach storage to the tree.

Mount /dev/nvme1n1 on /data for London Legal LLP.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

Hard Turn on IP forwarding

NAT and VPN servers need it.

Enable IPv6 forwarding on London Legal LLP's NAT server right now.

  1. Find the Linux command that does this job.
  2. Add the options (like -r or -h) the task needs.
  3. Add the file names, folders or users in the right order.
  4. Use sudo if the job changes system files or users. Click Check answer.

In short

  1. One tree from /.
  2. /etc config, /var/log logs, /home users, /usr programs, /opt vendors, /tmp scratch.
  3. /proc and /sys are live kernel views.
  4. Mount disks with UUID and nofail in /etc/fstab.

Revision, comparison and interview cards

Revise this lesson in a few minutes. Save the cards on your phone or download them as PNG files. The QR code on each card opens this lesson.

Key FHS folders. Find files on any server. /etc config, /var logs. /home users, /usr programs. Logs live here.
Revision card: Key FHS folders · Download PNG · Open card page
/proc and /dev. See live system info. /proc is made by the kernel. /dev holds device files. Check memory.
Revision card: /proc and /dev · Download PNG · Open card page
/etc vs /var. Config files. / Changing data.
Comparison: /etc vs /var · Download PNG · Open card page
/usr/bin vs /usr/sbin. Commands for everyone. / Admin commands.
Comparison: /usr/bin vs /usr/sbin · Download PNG · Open card page
/etc vs /var?. /etc holds config files. /var holds changing data. Logs grow in /var/log.
Interview card: /etc vs /var? · Download PNG · Open card page
/tmp vs /var/tmp?. /tmp may clear on reboot. /var/tmp survives reboot. Never keep data in /tmp.
Interview card: /tmp vs /var/tmp? · Download PNG · Open card page
Where to install your app?. /opt for third-party apps. /usr/local for own builds. Config in /etc/appname.
Interview card: Where to install your app? · Download PNG · Open card page
Disk full, which folder?. Check free space. Find the big folder. Often /var/log or /tmp.
Interview card: Disk full, which folder? · Download PNG · Open card page

More cards: Ravi Sir's Cards.