The Linux file system is organized differently from Windows. Rather than starting the directory structure at the volume level (C:, D:, E:, etc.), the entire system is a virtual tree structure organized under / (pronounced "root"). Under the root are a number of top-level directories, including:

  • bin—binaries
  • boot—system boot files
  • dev—a virtual directory of device files (like USB sticks, webcams)
  • etc—configuration files
  • home—users’ personal directories
  • lib—libraries (application code snippets)
  • media—where inserted removable media is mounted
  • mnt—(legacy) where storage or partitions are manually mounted
  • opt—where software you compile often ends up
  • proc—a virtual directory that contains information about running processes
  • root—home directory of the root superuser
  • usr—shared application files
  • sbin—applications only the superuser can run
  • srv—data for servers
  • sys—virtual directory about connected devices
  • tmp—temporary files
  • var—logs

Linux File System Navigation

Here are some key points to remember when navigating the Linux file system:

  • The Linux Bash (command-line interface) has its own commands that are case sensitive and (mostly) different from Microsoft DOS commands. Examples include:
  • ls -l—list files in long format (show file type, permissions, owner, group, size, last modified date and time, file name)
  • cd /—change directory back to /
  • pwd—display the present working directory
  • cd ~—change directory to the current user's profile
  • Use a forward slash (/) to separate path levels. For example:cd /root/Desktop leafpad /etc/network/interfaces
  • Everything, including running processes, is treated as a file.
  • Files with spaces in their names are enclosed in quotes.
  • Bash uses different colors for different file types. For example:
  • White: Document
  • Blue: Directory
  • Green: Executable or recognized data file
  • Sky Blue: Symbolic link file
  • Yellow: Device
  • Pink: Graphic image file
  • Red: Archive file
Bash file type colors

Note: Your top-level directories may be somewhat different, depending on your Linux distribution.