The Linux file-system tree explained.

The Linux file-system tree explained.

The standard Linux installation is laid out in various folders that each have a different role to play in the smooth running of a Linux distribution.

The / folder is the root directory of a Linux directory structure. There are the . and .. entries above the / folder, but this is the topmost folder and the root directory parents itself.

The /bin folder contains all of the basic Linux commands that are installed by the GNU Coreutils package such as rm, ls, cp and cat. The commands installed in this folder may be run by any user.

/boot is where the Linux kernel images and associated files reside. Usually they are named vmlinux although they may be named bzImage as well.

/dev The dev directory is where the Linux operating system stores its device files. For example a DVD drive would be /dev/sr0. The device file /dev/null is a bit bucket, files written to this device are immediately erased.

The /etc directory contains the configuration files for the various Linux programs that are installed on your system as well as the configuration for the bash shell and other miscellaneous Linux settings, such as configuring boot scripts and compilation settings in the case of a Gentoo system.

The /home folder contains various subdirectories that contain home folders for each user that is exists on a Linux system. Some users on a Linux machine merely exist to allow various packages to function and do not have a home folder.

The /lib directory contains the various shared libraries used by Linux programs to function. The purpose of a shared library is that code can be shared from the one library to many programs instead of every program needing to include that code themselves.

The /lost+found directory contains files restored after a major system malfunction. Linux will run file-system checks after a system crash and what data can be recovered will be stored here.

On most Linux systems, the /mnt folder will be used to mount various file-systems allowing the data to be accessed. Nowadays the /media folder will be used automatically when a file-system such as a USB drive or hard disk is mounted.

The /proc folder contains a range of virtual files that are representations of the various functions of your Linux machine. There are files such as /proc/meminfo that contain a wealth of information about your computers memory. And the /proc/version file that contains a string of text that tells you which kernel version you are running.

The /root directory contains the home folder for the root user on a Linux system. it is the same as the other home directories under /home, but it is only for the root user.

The /sbin directory is similar to the /bin directory, but it is reserved for system administration programs and you need to have system administration access to be able to run the programs in this directory.

The /tmp folder is the place where the Linux programs store their temporary data. This directory is readable and writable by the normal user and is very useful for creating temporary files when you are performing various Linux tasks.

The /usr directory contains the /usr/bin and /usr/share folders that contain system installed programs and the various resources needed by those programs respectively.

The /usr/local directory is the same as the /usr directory, this is where programs will be installed by default if you are installing from source. It is a good idea to install programs you have compiled yourself into the /usr/local folder and keep the /usr directory for programs installed through the package manager.

The /var directory is a place to store files on your Linux system that will change and be archived over time, such as the printer spools and the various log files such as /var/log. The mail files also reside in this directory. It is a good idea to read the files under /var/log to keep an eye on system activity.

Source: http://www.securitronlinux.com/lc/pocketbook2003.pdf, page 92.

About

I am a computer enthusiast that has always been interested in maintaining and upgrading computer hardware. I was born on a farm and lived there for 13 years before moving into town. I was always interested in technology and my father always gave me good encouragement for developing my knowledge and interest in tinkering with computers. He was using a computer on the farm but that was in the very late 80`s and late 90`s. Seeing what a computer could do always fascinated me and then I knew that is what I wanted to do. The first time I used Linux was Red Hat 6.2 installed off a single CDROM and I was amazed that you did not need to install any more drivers on my old Intel Celeron machine to be able to enjoy a nice 24BPP desktop and use the GIMP to edit photos and enjoy playing the old Linux games like Xbill. Then a while later I tried Mandrake Linux 9.2 and I was hooked. It came with so much software and was very easy to use as well. Then Mandrake Linux 10 and on through FreeBSD, Debian 3.0, Debian 3.1 Suse Linux 9.2, Suse 10 and onto the Ubuntu distributions although I am using Fedora Core 15 and the Gnome 3 desktop at the moment.

Tagged with: , , , , ,
Posted in Mint_Linux
One comment on “The Linux file-system tree explained.
  1. Super Jamie says:

    It’s also notable that you can directly manipulate some files in /proc for one-time actions (echo 3 > /proc/sys/vm/drop_caches) or to actually change system settings (echo 1 > /proc/sys/kernel/sysrq).

    This harks back to Dennis Ritchie’s UNIX philosophy of making everything based on text data (like the entries in /proc) rather on than binary data (such as the Windows Registry) as text is a human-readable format and enables in-depth interaction with, and automation of tasks on, the system.

Leave a Reply

Plugin from the creators of Brindes :: More at Plulz Wordpress Plugins