Dushyant Tyagi - Linux File System
  Home
  Abt Dushyant
  Linux File System
  Linux Basic Networking
  Contact
  Ur's Feedback
  Poll / Vote
  Gallery

GNU/LINUX File System Explained


dushyant.tyagi@gmail.com

Most of the newbies have been facing a confusion when it comes to GNU/LINUX file system. Most of them face problems when they migrate to the GNU/Linux from MS platform.

As the Linux kernel grows old more and more modifications are poured in to enrich it. I am going to discuss the most unchanged directories/file systems. Probably, they will never change unless another extraordinary talented person decides to make his own version of the operating system.


The newer version of Fedora Core has introduced a few changes that all Redhat users were habituated with. The introduction of /media confused a few person as all were habituated with mounting their cdrom to /mnt. Now they need to mount their cdrom to /media/cdrom.

A few changes like this will always be done, but the most common file systems and directories will remain same.

File system is the structure that contains all the informations on the system. Files are organized within a hierarchy of directories. Each directory may have files or subdirectories. And as per the general rule of the computer science, this hierarchy tree is also a upside down one. At the top of the tree resides the “root” and it is represented by the “/”. Below that, resides the following explained directories.

/bin

This is the short form of “binaries”. The directory holds the most common programs used by the regular users, administrators and the operating system itself. Normally /bin does not have subdirectories.

This directory is required to boot properly and should be part of the root (/) file system. It can not be created as the separate file system.

/boot

This holds the startup files and the kernel. These files are accessed before the rest of the file systems are even mounted. So this file system must be available to the boot loader that is placed in the MBR(Master Boot Record).

For this reason, it is often a separate file system in its own partition. /boot normally use to have no more subdirectories, until grub boot loader placed its configuration files under a subdirectory named grub.

/dev

Holds special files which refers hardware. On older systems, all possible hardwares was represented by files. On newer system, /dev is generated dynamically ( and is thus a virtual file system) and only contains files for hardwares that actually exists in the system. /dev may contain subdirectories ( representing various “classes” of hardware).

This directory is required to boot properly and should be part of the root (/) file system. It can not be created as the separate file system.

/etc

The most important global system configuration files reside here. It means, if you need any change in the behavior of the system or the applications; you need to come here. It contains data quite similar to the Control Panel or the Registry in the MS Windows. /etc contains many subdirectories to represent configuration file for particular applications.

This directory is required to boot properly and should be part of the root (/) file system. It can not be created as the separate file system.

/home

Contains one directory per “general”(non-system) users. The user stores their personal data, binaries and configuration files in their own subdirectory here. It is sometime mounted over a network from a central file server in order to provide users with their files wherever they login.

This directory can be created as a separate file system and/or have file system quotas/acl applied in order to limit the damage that a user or application may cause.

/lib

Most of the library files resides here. We can say that these files are quite similar to the dll files in MS Windows. /lib contains subdirectories to store the libraries for special things like kernel.

This directory is required to boot properly and should be part of the root (/) file system. It can not be created as the separate file system.

/mnt

Subdirectories in the /mnt are used as the mount points for temporary media such as cdrom, floppy. It does not contain regular files on the local computer.

/opt

/opt contains optional or third party softwares. To some extent it is identical to /usr/local on other Unix variant. /opt contains one subdirectory per application.

/proc

This is a virtual file system. It contains “files” that represent running processes, system resources, and other pieces of kernel information. Programs such as ps and top use /proc to access information about running processes rather than talking directly to the kernel as they do in the Unix variants. As a virtual file-system, /proc is in the root file system. If it is not mounted, some tools may deny to function properly. /proc contains many subdirectories. Each process is represented as a subdirectory, as is each category of special information.

This directory is required to boot properly and should be part of the root (/) file system. It can not be created as the separate file system.

/root

This is the home directory for the root user. It is located in the root file system rather than in /home so that root's( Administrator's) files are available even when /home is not mounted. This is important as the administrator must login to his directory to fix any problem that may be there with /home. If root's home directory was placed under /home, this would have never been possible. System Administrator must have a different place for himself afterall.

This directory is required to ensure the root's login and should be part of the root (/) file system. It can not be created as the separate file system.

/sbin

Short form of “System Binaries”, this directory is very similar to /bin, but contains only programs those are not needed by the regular users. Permissions for this directory are often set so that regular users can not access it.

This directory is required to boot properly and should be part of the root (/) file system. It can not be created as the separate file system.

/tmp

This is the short form of “Temporary”, this directory is used for temporary storage by all users (including system itself). This is truly temporary space, as it is normally cleaned out by the boot scripts on every boot.

/tmp is often created as separate file system and may have file system quotas applied in order to limit the potential damages that a user may cause.

/usr

/usr is normally a seperate file system, and may even be remotely mounted from a file server. In many ways it mirrors the root file system in subdirectory layout. It is used to hold applications, libraries, and configuration files that are not necessary to boot the system.

/usr/local is very much like /usr within /usr. It is used to hold applications that are installed by the administrator, rather than provided by the operating system vendor. /opt is now used to perform this function.


/var

Short for “variable”, /var is used for temporary files that require long-term storage. Important subdirectories include log (for log file), spool ( for mail and print jobs ), and tmp (for temporary storage that will survive a reboot).

/lost+found

Every file system has a lost+found entry in it. Files recovered by fsck while recovering/repairing the file system are located here.


Permission to redistribute this document to all at no charge is granted and encouraged by the author.

This Site is currently Under construction. Thank you for your interest. Please visit with us again ---- Dushyant Tyagi
 
Today, there have been 1 visitors (2 hits) on this page!
This website was created for free with Own-Free-Website.com. Would you also like to have your own website?
Sign up for free