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.
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).
Both 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.
As 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.
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.
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:
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.
Yes, a good intro I think. Maybe you could do a more detailed walktrough?