Logo
← Back to Blog

Ubuntu Note

System Files

A practical reference for common Linux and Ubuntu directories, including system software, user files, devices, runtime data, and typical locations for configuration and installed applications.

These notes organize common Linux directories by purpose so it is easier to remember where applications, libraries, configuration files, user data, devices, and temporary files normally belong.

System-wide directories

/bin

Essential system binaries such as ls, cp, and bash.

/sbin

Essential system binaries for administrative tasks such as fsck and reboot.

/usr

Contains most user utilities and applications.

  • /usr/bin: user binaries such as Vim and Python.
  • /usr/sbin: administrative binaries.
  • /usr/lib: libraries used by programs in /usr/bin and /usr/sbin.
  • /usr/local: manually compiled or locally installed software.
/opt

Self-contained third-party or proprietary software, for example Google Chrome or MATLAB.

/etc

System and application configuration files, for example /etc/hosts and /etc/passwd.

/lib and /lib64

Essential shared libraries required by programs in /bin and /sbin.

/var

Variable data such as logs, caches, and changing application files.

  • /var/log: system logs such as syslog and auth.log.
  • /var/www: web server files.

User-specific directories

/home

Home directories for normal users, for example /home/user.

~/.local

User-specific applications and application data.

  • ~/.local/bin: executables installed for one user.
  • ~/.local/share: user-specific application data.
~/bin

A user-created location for personal scripts or programs.

Device and system directories

/dev

Device files such as /dev/sda for disks and /dev/null.

/proc

A virtual filesystem that exposes information about running processes.

/sys

A virtual filesystem used for system and hardware information.

/mnt and /media

Common mount points for filesystems.

  • /mnt: temporary mounts.
  • /media: removable media such as USB drives.
/boot

Boot-related files such as kernels and the GRUB bootloader.

/tmp

Temporary files. The original note describes these as being cleared on reboot.

Special directories

/root

Home directory for the root user.

/run

Runtime data such as process IDs and sockets.

Quick decision table for file placement

A compact reference from the original note for choosing a common location based on the purpose of the file or software.

Purpose Directory
System-critical binaries /bin, /sbin
System-wide software, managed /usr/bin, /usr/lib
System-wide software, manual /usr/local
Standalone or proprietary software /opt
Configurations /etc
Logs /var/log
Temporary files /tmp
User-specific software ~/.local/bin, ~/bin
User home files /home/<username>