The single filesystem tree
Linux presents storage as one directory tree beginning at /. There are no drive letters. Additional disks, partitions, network shares, and virtual filesystems are attached at directories called mount points.
This model makes the system consistent. A USB drive might appear under /media/alex/USB, a server data disk under /srv/data, and a virtual process view under /proc. They are different sources, but all appear as paths.
Paths and path resolution
An absolute path starts at /, such as /etc/ssh/sshd_config. A relative path starts from the current working directory, such as ../notes/todo.txt.
The shell expands shortcuts before many commands run. ~ means your home directory. . means the current directory. .. means the parent directory. Hidden files are names beginning with a dot, such as .profile.
pwd
ls /etc
ls ../shared
ls ~/.configTop-level directories and what they mean
The top-level directories are not random. They separate user data, system configuration, variable state, installed software, devices, runtime data, temporary files, and virtual kernel views.
| Directory | Meaning | Examples |
|---|---|---|
| /home | Regular users' personal files and configuration | /home/alex/Documents, /home/alex/.config |
| /etc | System-wide configuration | /etc/ssh/sshd_config, /etc/fstab |
| /var | Variable data that changes over time | /var/log, /var/cache, /var/lib |
| /usr | Most user-space programs, libraries, and shared data | /usr/bin, /usr/lib, /usr/share |
| /bin | Essential user commands, often merged into /usr/bin | /bin/sh, /bin/ls |
| /sbin | Essential system administration commands, often merged into /usr/sbin | /sbin/ip, /sbin/fsck |
| /opt | Optional third-party application bundles | /opt/google, /opt/vendor-app |
| /tmp | Temporary files often cleared automatically | /tmp/session-data |
| /dev | Device files representing hardware and kernel interfaces | /dev/sda, /dev/null |
| /proc | Virtual process and kernel information | /proc/cpuinfo, /proc/1234 |
| /sys | Virtual device and kernel subsystem information | /sys/class, /sys/block |
| /run | Runtime state since boot | /run/systemd, /run/user/1000 |
| /mnt | Temporary manual mount points | /mnt/backup |
| /media | Removable media mounted for users | /media/alex/USB |
| /root | Home directory for the root user | /root/.ssh |
Mount points
A mount point is a directory where a filesystem is attached. Before mounting, the directory is just a directory. After mounting, the mounted filesystem's root appears there.
Mounts let Linux place different storage sources at meaningful locations. A web server might store site data on a separate disk mounted at /srv/www. A removable drive might mount under /media.
Virtual filesystems: /proc, /sys, /dev, and /run
/proc and /sys are not normal folders stored on disk. They are kernel-provided views into process, hardware, and kernel state. Reading files there asks the kernel for information.
/dev contains device nodes that programs use to talk to devices through kernel drivers. /run contains runtime state created since the last boot, such as sockets, PID files, and per-user runtime directories.
Examples of real files and what they represent
| Path | What it tells you |
|---|---|
| /etc/os-release | Distribution name and version information |
| /etc/fstab | Filesystems the system should mount at boot |
| /var/log | Traditional log file directory |
| /proc/cpuinfo | CPU information from the kernel |
| /proc/meminfo | Memory information from the kernel |
| /sys/class/net | Network interfaces exposed through sysfs |
| /dev/null | A device that discards anything written to it |
Where user data, configuration, logs, and runtime data live
User documents normally belong in /home. User-specific app settings usually live under hidden folders such as ~/.config, ~/.local, and ~/.cache. System-wide configuration belongs in /etc. Logs usually live in the systemd journal, /var/log, or application-specific locations under /var.
Runtime files under /run are not permanent. Temporary files under /tmp should not be trusted for long-term storage. Package-managed files under /usr should normally be changed through packages, not hand-edited.