Filesystem - hiding system folders?

Alan McKinnon alan at linuxholdings.co.za
Wed Mar 29 15:11:49 BST 2006


On Wednesday 29 March 2006 11:33, Tollef Fog Heen wrote:
> * Chanchao
>
> | There's: bin, boot, cdrom (can live with that one), dev, etc,
> | initrd, lib, lost+found, media (can live with that one too, but
> | isn't cdrom 'media' as well), mnt (hey, didn't that all go in
> | 'media'), opt, proc, rofs, root, sbin, srv, sys, target, tmp, usr
> | and var.

It's not complex, it's a bunch of things that have different purposes. 
Whether there is two or ten directories at /, the complexity doesn't 
change. Here's what they are for:

/bin: System programs that everyone can use
/boot: Images used at boot time. They have their own directory because 
they are built on a running OS, and this way they are nicely 
compartmented away from everything else
/cdrom is a symlink to the actual directory at /media/cdrom. It's 
there for backwards compatibility for the days when the CD was 
mounted at /cdrom/
/dev: Devices, all nicely in their own directory
/etc: configuration files. Text, so a person can read them
/initrd: A technical hack having to do with what to do with the RAM 
disk image used when booting after the real / is mounted
/lib: System libraries for programs in /bin and /sbin
/lost+found: damaged data files found when checking disks go here. 
MUCH better than a bazillion CHK0000x files cluttering up / a-la DOS
/media is for removable media like CDs and memory sticks that are 
plugged in and out a lot
/mnt is for permanent mounts that are not often unmounted, like shared 
data folders over a network
/opt is for (usually) pre-compiled 3rd party apps (opera, java, 
skype). They have their own space so they don't interfere with /usr
/proc: An easy way to get info out of a running kernel. 
/rofs: Dunno
/root: root's home directory. Done this way so that it's still 
available in maintenance mode when it's likely only / is mounted
/sbin: System programs that normally only root uses like fdisk, mkfs*, 
netstat. Separate from /bin so it can go in root's $PATH but not a 
user's
/srv: An easy way to keep ftp and www sites together, and have them on 
their own partition. Previously, they were in /var somewhere, which 
gets very clunky very quickly
/sys: works the same way that /proc works, but shows different stuff
/target: dunno
/tmp: temporary scratch files. Like this it can easily be a RAM disk
/usr: User programs not considered part of the base OS. Gnome goes 
here for example
/var: Data that is usable by more than one user like databases and the 
package manager's record of what's installed already

You might think that this can be simplified, but it can't. 
Joining /bin, /lib, /sbin and /usr into one directory is not a good 
idea as you lose control of how the OS works. 
Maybe /proc /sys /dev /lost+found /boot /initrd and /tmp could be 
gathered under one dir called /system and similarly 
with /mnt /cdrom /media /srv. But all that does is convert a linear 
row of things into a more complex tree structure with no extra 
benefit. As soon as you open that folder, you see all the subfolders 
anyway.

-- 
Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five



More information about the sounder mailing list