Linux root folders
1 Modern Linux:
1.1 /bin
basic binaries such as cat, ls, cd
1.2 /sbin
system binaries that a sysadmin would use, typically used only by root.
1.3 /boot
bootloaders
1.4 /cdrom
not in all distros
1.5 /dev
where your hardware devices live
- sda is your disk
- sda1 is partition 1
- sda2 is partition 2 …
- keyboard ?
1.6 /etc
Dennis Ritchie says it really just meant "etcetera"
All configurations are store here (well system wide settings)
1.7 /home
each user has a directory here. each user will also have lib directories here for personal settings and others.
home.cache
home.config
home.theme (and icons etc…) Make sure you backup these hidden folders
home.local
home
1.8 /lib, /lib32 /lib64
Libraries that hold needed software for applications.
1.9 /mnt
external mount points found here. Modern linuxes also mount stuff like usb keys, … in /media. Most distros automatically mount external drives in /media But if you are manually mounting somethin, use /mnt
/media/zintis/device-name i.e. /medai/zintis/usb65GB
1.10 /opt
optionally installed s/w would be found here. Also a good place to install apps that you developed yourself
1.11 /proc
All processes. These are pseudo files that have information related to currently running processes. For example if I run top and see that my emacs is using PID 5627, then I can peak in /proc/5627 to see all the files that my emacs has open.
/proc/cpuinfo has interesting info on your cpu. /proc/uptime holds your system uptime.
1.12 /root
Just a home folder for root
1.13 /run
Rather new, and is a tmpfs (it runs in ram only) Some distros do not have /run
1.14 /snap
self contained small applications
1.15 /srv
The root of server's externally facing directory.
1.16 /sys
system folder A way to interact with the kernel. A tmpfs, only exists in RAM
1.17 /tmp
temporary files used by applications. Empty after a reboot, but NOT a RAM disk. These are stored on the disk itself, it just that it gets wiped on a reboot.
1.18 /usr
Non-critical application folders. Your user apps will be "Unix System Resource", but could also think of it as user apps directory
1.18.1 /usr/bin
installed apps
1.18.2 /usr/sbin
installed apps
1.18.3 /usr/lib
libraries for apps in /usr/bin or /usr/sbin
——— many apps installed from source code, go in /usr/local –————
1.18.4 /usr/local/bin
installed apps
1.18.5 /usr/local/sbin
installed apps
1.18.6 /usr/local/lib
libraries for apps in /usr/local/bin or /usr/local/sbin
1.18.7 /usr/share
for large apps. Large apps install themselves here
1.18.8 /usr/share/src
source code for these larger apps in /usr/share/bin and /usr/share/sbin
1.19 /var
variable sized files
1.19.1 /var/log
for logging by system apps and others
1.19.2 /var/crash
crash reports go here
1.19.3 /var/spool
temporary storage for printer queues