Learning

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

Last Updated on May 22, 2022

This series offers a gentle introduction to Linux for newcomers.

Ubuntu has a very different file system compared to Windows. It’s organized in a completely different way designed to offer more security, but it’ll feel very unfamiliar if you’ve come exclusively from a Windows background.

It’s therefore worth devoting time to learning about the file system in Ubuntu.


/

The / directory is the root of the system where all files and folders branch off from. It’s represented as a forward slash ‘/’. You can access all other folders from here.
Linux for Starters - Filesystem - root
There’s a couple of icons different to the standard folder icon. The swapfile is a file not a directory (although in Linux a directory is a file).

Linux for Starters - PermissionsBoth the root folder and the swapfile have a red cross in their icon. This means that, as a regular user, they aren’t accessible; we’d need to use superuser privileges for access (which can be temporarily attained using the sudo command). We covered file permissions here.

Linux for Staters - LinkAs you can see from the image, a few of the directory icons contain a diagonal arrow in their bottom right hand corner. This symbol tells us that the directory points to another file or folder on your computer. These symlinks are sometimes called “soft links”. Soft links are similar to shortcuts, and can point to another file or directory in any file system.

We can see where /bin points to with a right mouse click on that directory and selecting the properties menu.

Linux for Starters - File System - bin properties

As you can see /bin is a soft link to /usr/bin.


/home

/home is where the personal home areas of all the configured users on the system are held. Each user has their own home folder. Within that folder are sub-folders such as Downloads, Music, Pictures, Videos, and others.

You’ll have permission here to create your own folders without needing to access superuser privileges. You should store all your personal files here.
Linux for Starters - File System - home
One thing that won’t be immediately obvious is that there are other important files here. Hidden files, also called dot files, are files used in order to execute some scripts or to store configuration about some services on your host.

If you want to see all hidden files in a folder, go to that folder and either click the view options button in the toolbar and pick Show Hidden Files, or press Ctrl+H. You will see all hidden files, along with regular files that are not hidden.

Some popular examples of hidden files are the files contained in the user home directory : .bashrc that stores user initialization scripts or .bash_logout that is executed whenever you leave a bash session. You should have a look in ~/.config too, a directory which stores configuration files for your programs.

Page 2 – /usr, /bin, /sbin, /snap, /boot, /etc

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.
Subscribe
Notify of
guest

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

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Ethan "Roomer" James
Ethan "Roomer" James
3 years ago

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.

RustyN
RustyN
3 years ago

Yes, a good intro I think. Maybe you could do a more detailed walktrough?