Back to the home page
The Linux file system is structured differently than the Windows file system that you're probably used to. Below you can find a brief explanation of its main characteristics.
Everything in Linux is organized in folders; even the hard disks and DVD drives are... folders. These folders can have subfolders. Each folder and every file in a folder, has an individual owner.
I'll explain something about the following folders:
1. /
2. /home
3. /usr/bin and /usr/sbin
4. /usr/share/pixmaps
5. /media and /dev
6. /boot/grub
7. /usr/lib
8. /etc
9. The following related directories:
~/.local/share/
/usr/local/share/
/usr/share/
1. The root folder
The primary folder is the "/" (without the quotation marks), or the root (the character looks somewhat like a carrot, hence the name). Anyone who owns a folder, is also owner or co-owner of all subfolders and the subfolders of the subfolders (etc.). You get the picture.....
The administrator is the owner of the primary folder, the root, and has therefore supreme authority over the whole system.
2. The home folder
An ordinary user, let's call him John, is only owner of his own personal folder. This folder is called /home/john and is a subfolder of /home. But John is not the only owner of /home/john; of course the root is always co-owner.
The configuration files of all applications are placed in each user's folder. Each user has his own set. That reduces the risk of systemwide damage. The configuration files are hidden. You can make them visible by doing this:
Launch your file manager and press the key combination Ctrl h
Now you can see the hidden files and folders (with a dot before their names, such as .mozilla).
Has the configuration of an application become corrupted? Make sure that the application that it belongs to, is closed. Then simply delete the configuration folder for that application.
Then re-launch the application: it will generate a new configuration folder with the default settings.
3. The launchers
An application generally has its launcher in /usr/bin and can therefore be launched by double-clicking that launcher there (when it has no shortcut in the menu). Or it can be launched from the terminal, by typing the name of the launcher and pressing Enter.
For example: to launch Firefox from the terminal, you can simply type firefox (and press Enter) because the launcher of Firefox in /usr/bin is called firefox.
Launchers for applications that need root rights, are in /usr/sbin.
4. Pictures, logo's and icons
The map /usr/share/pixmaps contains all kinds of pictures, logo's and icons.
5. The partitions
A mounted (accessible) partition of a hard drive has two folders. One is in /media (or in /mnt) and the other is in /dev.
The first hard drive is called hda or sda. The second hard drive is called hdb or sdb. The first partition on the first hard drive is called hda1 or sda1. When it's mounted, the folder of sda1 is therefore both in /media/sda1 and in /dev/sda1.
When a partition is not mounted (not accessible), then it has only one folder, namely in /dev.
So if a partition is mounted: two folders. If not mounted: only one folder.
6. Bootloader Grub
Bootloader Grub has part of its files in /boot/grub (other parts are in the Master Boot Record of the hard disk, in /etc/default/grub and in /etc/grub.d).
Note: if you wish to change Grub manually, you're only supposed to make changes in /etc/default/grub (followed by sudo update-grub in order to implement the changes).
7. The libraries
In /usr/lib you can find most library files. These are supporting libraries. Their names have no extension. In Windows for example, these supporting libraries are called DLL (Dynamic Link Libraries) and there they do have an extension, namely .dll.
In Linux you can recognize a library file by the first part of its name, which is always lib (for example, a library for the application "example", can be called "libexample" (no extension).
/lib has become a symlink to
8. The editable text configurations
In /etc reside the text configurations that allow you to modify the system settings (more or less) easily. These modifications only become effective after a reboot and sometimes they even need to be followed by a dedicated update command.
Beware: don't change anything in those configurations unless you know exactly what you're doing! There's a high risk of borking your system beyond repair.
9. User settings and systemwide settings
First a bit of information about the home folder. The tilde ~ is shorthand for the user's home folder.
So for me, ~/ is directly equivalent to /home/pjotr/
~/.local/ is a hidden folder in every user's home folder (folders and files whose names start with a dot are always hidden by default). In your file manager, the key combination Ctrl h will show hidden folders and files (or hide them). If you dislike key combinations: file managers typically also contain a "clickable" way to display the hidden stuff.
~/.local/share/ can contain configuration files that modify the system for that specific user. On multiuser systems, those modifications will not be available for other users. They're equivalent to the systemwide configuration files found in the system folder /usr/share/
If the system files in /usr/share/ and the user's files in ~/.local/share/ conflict, the user's files in ~/.local/share/ take precedence (for that user account).
There is also an "intermediate" location called /usr/local/share/
The system administrator can utilize that folder for manual tweaks that are valid for all user accounts. He should use that folder rather than /usr/share/, because the contents of /usr/share/ can be overwritten by system updates.
In terms of precedence: ~/.local/share/ has precedence over /usr/local/share/, which in its turn has precedence over /usr/share/
(item 9 is based on the excellent explanation given by smurphos on the Linux Mint forum)
Want more tips?
Do you want more tips and tweaks? There's a lot more of them on this website!
For example:
Speed up your Linux Mint!
Clean your Linux Mint safely
Avoid 10 fatal mistakes
To the content of this website applies a Creative Commons license.
Back to the home page
Disclaimer
8. The editable text configurations
In /etc reside the text configurations that allow you to modify the system settings (more or less) easily. These modifications only become effective after a reboot and sometimes they even need to be followed by a dedicated update command.
Beware: don't change anything in those configurations unless you know exactly what you're doing! There's a high risk of borking your system beyond repair.
9. User settings and systemwide settings
First a bit of information about the home folder. The tilde ~ is shorthand for the user's home folder.
So for me, ~/ is directly equivalent to /home/pjotr/
~/.local/ is a hidden folder in every user's home folder (folders and files whose names start with a dot are always hidden by default). In your file manager, the key combination Ctrl h will show hidden folders and files (or hide them). If you dislike key combinations: file managers typically also contain a "clickable" way to display the hidden stuff.
~/.local/share/ can contain configuration files that modify the system for that specific user. On multiuser systems, those modifications will not be available for other users. They're equivalent to the systemwide configuration files found in the system folder /usr/share/
If the system files in /usr/share/ and the user's files in ~/.local/share/ conflict, the user's files in ~/.local/share/ take precedence (for that user account).
There is also an "intermediate" location called /usr/local/share/
The system administrator can utilize that folder for manual tweaks that are valid for all user accounts. He should use that folder rather than /usr/share/, because the contents of /usr/share/ can be overwritten by system updates.
In terms of precedence: ~/.local/share/ has precedence over /usr/local/share/, which in its turn has precedence over /usr/share/
(item 9 is based on the excellent explanation given by smurphos on the Linux Mint forum)
Want more tips?
Do you want more tips and tweaks? There's a lot more of them on this website!
For example:
Speed up your Linux Mint!
Clean your Linux Mint safely
Avoid 10 fatal mistakes
To the content of this website applies a Creative Commons license.
Back to the home page
Disclaimer