Verzeichnislayout
Übersicht über die Verzeichnisstruktur
/
├── bin → Essential user commands
├── boot → Boot files
├── dev → Device files
├── etc → System configuration
├── home → User home directories
├── lib → System library files
├── media → Auto-mount points
├── mnt → Manual mount points
├── opt → Third-party software
├── proc → Process information (virtual)
├── root → Root user home directory
├── run → Runtime data
├── sbin → System administration commands
├── srv → Service data
├── sys → Kernel device information (virtual)
├── tmp → Temporary files
├── usr → User-level programs and data
└── var → Variable dataDetaillierte Beschreibungen
/etc – Systemkonfigurationsdateien
Speichert Konfigurationsdateien für fast alle Systemdienste.
/etc/
├── apt/ # APT package manager configuration
│ └── sources.list.d/ # Software source configuration
├── default/grub # GRUB bootloader configuration
├── fstab # Disk mount configuration
├── hostname # Hostname
├── hosts # Local DNS mapping
├── NetworkManager/ # Network management configuration
├── nginx/ # Nginx configuration (if installed)
├── passwd # User account information
├── shadow # User passwords (encrypted)
├── ssh/ # SSH server configuration
├── sudoers # sudo permissions configuration
├── systemd/ # systemd configuration overrides
└── environment # Global environment variables/var – Variable Daten
Speichert Daten, die sich während der Laufzeit ändern.
/var/
├── cache/apt/archives/ # APT download cache
├── lib/ # Program runtime data
│ ├── dpkg/ # dpkg package database
│ └── snapd/ # Snap data
├── log/ # System logs
│ ├── syslog # System log
│ ├── auth.log # Authentication log
│ └── kern.log # Kernel log
├── mail/ # Mail
├── spool/cron/ # Cron jobs
└── www/html/ # Default web directory/home – Benutzer-Home-Verzeichnisse
Jeder reguläre Benutzer verfügt über ein /home/username-Verzeichnis.
/home/user/
├── .bashrc # Bash configuration
├── .config/ # User-level application configuration (XDG)
├── .local/ # User-level data and programs
│ ├── bin/ # User-level executables
│ └── share/ # User-level data
├── .ssh/ # SSH keys and configuration
├── Desktop/ # Desktop
├── Documents/ # Documents
├── Downloads/ # Downloads
└── snap/ # Snap user data/usr – Programme auf Benutzerebene
Vom System installierte Programme und Bibliotheksdateien. Schreibgeschütztes Verzeichnis.
/usr/
├── bin/ # User commands (ls, cp, vim, etc.)
├── sbin/ # System administration commands
├── lib/ # Library files
├── lib64/ # 64-bit library files
├── include/ # C/C++ header files
├── share/ # Architecture-independent data
│ ├── applications/ # .desktop files
│ ├── doc/ # Documentation
│ ├── fonts/ # Fonts
│ └── man/ # Man pages
└── local/ # Locally compiled programs
├── bin/
├── lib/
└── share//opt – Software von Drittanbietern
Unabhängig installierte kommerzielle oder große Softwarepakete von Drittanbietern.
/opt/
├── google/chrome/ # Google Chrome
├── visual-studio-code/ # VS Code (when not installed as Snap)
└── .../tmp – Temporäre Dateien
Für alle Benutzer lesbar und beschreibbar. Wird normalerweise beim Systemneustart gelöscht.
# Check /tmp usage
du -sh /tmp
# Permissions: drwxrwxrwt (sticky bit)
# Anyone can write, but only the owner can delete their own files/boot – Boot-Dateien
/boot/
├── vmlinuz-* # Linux kernel
├── initrd.img-* # Initial RAM disk
├── config-* # Kernel configuration
├── grub/ # GRUB bootloader
│ └── grub.cfg # GRUB configuration (auto-generated)
└── efi/ # EFI partition mount point
└── EFI/
├── ubuntu/ # Ubuntu boot files
└── BOOT/ # Default boot files/dev – Gerätedateien
/dev/
├── sda, sdb... # SATA/SCSI hard drives
├── nvme0n1 # NVMe hard drive
├── tty* # Terminal devices
├── video0 # Webcam
├── null # Null device (discards output)
├── zero # Zero device (produces zero bytes)
├── random, urandom # Random number generators
└── loop* # Loop devices (used by Snap)/proc und /sys – Virtuelle Dateisysteme
Hierbei handelt es sich nicht um echte Festplattendateien, sondern um vom Kernel bereitgestellte Schnittstellen.
# Common /proc files
cat /proc/cpuinfo # CPU information
cat /proc/meminfo # Memory information
cat /proc/version # Kernel version
cat /proc/partitions # Partition information
# Common /sys files
cat /sys/class/power_supply/BAT0/capacity # Battery level
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor # CPU frequency governor/run – Laufzeitdaten
Temporäre Laufzeitdaten, die nach dem Systemstart generiert werden; beim Neustart gelöscht.
/run/
├── user/1000/ # Current user runtime data
├── snapd/ # Snap runtime
├── lock/ # Lock files
└── systemd/ # systemd runtimeSchnelle Suche
# Find the path of a command
which command-name
type command-name
# Find which package owns a file
dpkg -S /path/to/file
# List files installed by a package
dpkg -L package-name