Learning

Linux for Starters: Your Guide to Linux – Understanding the File System – Part 12

/usr

/usr is a place for system-wide, read-only files. A lot of your installed software is stored here, together with system libraries.
Linux for Starters - File System - usr


/bin

Historically, /bin contains executables which are required by the system for emergency repairs, booting, and single user mode. /usr/bin contains any binaries that aren’t required for these purposes.

In Ubuntu /bin is a symlink to /usr/bin. So the image below is really showing the files and folders stored in /usr/bin/.
Linux for Starters - File System - bin
All this means is that commands that represent the bare minimum to run and maintain a system are lumped together in the same place as programs installed by you (and any other users on your system).


/sbin

Traditionally /sbin contains applications that only the superuser can execute; commands such as mount and fdisk. These applications can be used with the sudo command that temporarily allows a regular user superuser powers.

On Ubuntu 21.04 /sbin is a symlink to /usr/sbin.
Linux for Starters - File System - sbin


/snap

The /snap directory is, by default, where the files and folders from installed snap packages appear on your system.
Linux for Starters - File System - snap
These files and folders are mounted from the heavily compressed data that’s stored within the original snap, located in/var/lib/snapd/snaps.


/boot

The /boot directory contains the files needed to allow Ubuntu to boot. You want to keep clear of this directory. It’s only accessible with superuser privileges so don’t worry about accidentally damaging your system.
Linux for Starters - File System - boot
The vmlinuz is the name of the Linux kernel executable. vmlinuz is a compressed Linux kernel, and it’s capable of loading the operating system into memory so that the computer becomes usable and application programs can be run.


/etc

/etc holds the configuration files unique to the system although not all system-wide configuration files reside here. Nevertheless, it’s sometimes regarded as the nerve centre of Ubuntu, where the control and operation of all processes is held.
Linux for Starters - File System - etc
It’s best not to tinker with files in /etc until you’ve mastered the basics.


Page 3 – /dev, /lib, /tmp, /var, and other locations

Pages in this article:
Page 1 – / and /home
Page 2 – /usr, /bin, /sbin, /snap, /boot, and /etc
Page 3 – /dev, /lib, /tmp, /var, and other locations


All articles in this series:

Linux For Starters: Your Guide to Linux
1What is Linux? Why use Linux? What do I need?
2Choose a Linux distribution meeting your specific needs and requirements.
3Make a bootable Ubuntu USB stick in Windows.
4We show you how to install Ubuntu 21.04 on your hard disk.
5Things to do after installing Ubuntu.
6Navigating your way around the Desktop.
7Updating the system, install new software.
8Open source replacements for proprietary Windows desktop software.
9Get started with the power and flexibility of the terminal.
10We cover the basics of files and permissions.
11Getting help from your system.
12Learn all about the file system.
13Manipulating files from the shell.
14Maintain your system with these simple tips.
15Managing users on your system.
16Explore different desktops to GNOME 3.
17Gaming on Linux.
18Protect your privacy with this guide.
19Access the Windows desktop from Linux using a remote desktop client.
20Set up a virtual machine running Ubuntu as the host and openSUSE as the guest.
21Wine lets you run Windows programs on Linux without emulation.
22Extend your GNOME desktop with extensions and themes.
XUseful Linux commands.
Share this article

2 comments

  1. Thanks. This is a pretty good explanation of the basics of the file system. It’s definitely one of the hardest areas to get your head round coming from a purely Windows background.

Share your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.