Linux 101: file structure/hierarchy
File structure is the basic things people get confuse when start using Linux. Most people nowadays are likely to stick with Windows’ idea, e.g.C:\Windows\ or C:\Program files\ or C:\Users\xxxx. That’s pretty easy to understand. *nix file structure was confusing at first, but it’s not that hard to understand. In order to learn using it, then you have to know where things are first.
In *nix system, everything is a file. Whatever they are, they are represented in file format. There is no extension to distinguish any type of file, but utility called file can identify it. directory is also one kind of file. Process is also represented in file. We’ll talk about ‘file’ in detail later. Ok, I got to start with what each of directory in *nix is for.
/ Every tree needs root, file structure is also the same. /boot This is for boot loader files, e.g. GRUB, KERNEL, SYSTEM.MAP, VMLINUZ, INITRD, … /bin bin == binary; it contains commands stuff and /bin is for essential ones only. /etc This is for any system configuration; if you ever need to adjust things, this is likely to be the place to go. /sbin it doesn’t differ to /bin that much, but it contains system utilities that don’t need that much speed. /home This is the same as c:\users in Windows’ sense. Just contain any thing of each user in /home/<usr> commonly. /usr This is not where users store file, but it has hierarchy like / too. /usr/bin, /usr/lib, /usr/local/share, /usr/share, for example. What difference between /usr/bin and /bin is /bin usually contains kernel command while /usr/bin contains user commands that are not related to kernel/OS At first, /bin was designed to use in different disk (faster one) and the rest will be in /usr/bin or /usr/local/bin. /usr/binvs /usr/local/bin The difference is /usr/bin stored user commands while /usr/local/bin stored local software /opt That’s for application software, such as Thunderbird and such. /root This is home for root =) /tmp tmp == temporary; it uses as its name. /var var == variable. It uses to store configuration, logging and application information /mnt mnt == mount point; some distros use this, some don’t, some even use /Windows or /media instead of this
note: basically each of these will be in different partition/disk as well, so there is another factor involved, speed. That’s why it has commands in all over the place. Some utilities are just more important than others.
Above matrix should cover basic filesystem structure. As usual, different distribution might have a bit of different point of view, but they all share the same idea =) After knowing each of these files are for, then you will know where to expect particular files or things you need. Have fun with *nix experience.
Popularity: 10% [?]
Well, fonts are the weakest link in Linux in my opinion. Sharpness, crispness, or smoothness are just not right. That’s most likely to be the reason why Linux never gains that much user like Windows or even Mac in desktop environment.
Besides using package manager which is truly find and click, when you are going to add fonts in Linux by yourself, you should put in fontpath. They are in /usr/share/fonts or /usr/local/share/fonts or ~/.fonts/ then what you have to do is copying.
$ cp *.ttf ~/.fonts/
At this point, it will not notice the change yet. New fonts will not be visible. You have to run command, to update and rebuild its of fonts first.
$ fc-cache
That would be it. However, if you decide to put fonts in somewhere else, you have to edit ‘fonts.conf’ to add font directory in the list as well.
$ vi /etc/fonts/fonts.conf
Where <!— font directory list –> is by adding
<dir>/opt/fonts/xxxx</dir>
Then rebuild the list and restart x (easiest way is Ctrl + Alt + Backspace). At this point, all fonts will be available to use =) Anyway, I still don’t think font smoothing or crispness in Linux is good enough so far. If that day comes, I bet Linux will outpace Mac and Windows in desktop environment surely.
Popularity: 2% [?]