Monday, November 24, 2008

File Systems and Directories

A Filesystem means any organisation of files in a particular physical device. Organisation in the sense that the files are arranged in a hierarchical structure starting from the root(/) directory followed by the subdirectories like a tree. As we are very familiar with the NTFS or FAT32 filesystems used by Windows based systems, Normally linux distros use ext2 or ext3 filesystem or the latest ext4. While the cd drives are based on iso9660 filesystem.
As the structure and rules of different file systems varies, thus their visibilities. A hard disk can have different file systems on different partitions. Eventhough the NTFS based Windows file systems are easily detected by Linux,the inverse is not possible unless we use some softwares.

The Linux operating system has a different design philosophy. Everything connected to the system is considered as a file. Hard disk partitions, removable media, peripheral devices etc can be accessed as a file under the root. This concept gives several advantages to the Linux operating System as a whole.

Here are some directories which are created when the system is installed. They are common for most of the linux distributions.

/ - As already mentioned, this is the root directory, which contains every other directory.

/root
-/root is the home directory of the root user, or superuser. It's a directory called /root, but it isn't the root directory /. Pronounced as 'Slash Root'.

/home -This is where all normal users - that is, all users except root have their home directories. Home directories are named after the user who owns them. All the works done by the user are saved in this directory.

/bin - "binaries", the executable files are stored in this directory.

/sbin - "system binaries", the files needed by the root user or system administrator.

/usr - applications and files needed for the user are stored in this directory.

/usr/local - Any software which does not belong to the base system package is installed in this directory.

/etc - It contains all the system configuration files that are common to all users, like configuring the network connection, video cards etc. Super User previlages are needed to change it.

/tmp - Temperory files created by the system. They are deleted when system reboots.

/var -Variable files that the system changes automatically. The System keeps a log of its actions and databases in this directory. The error messages are found here.

/boot -boot configuration files.

/dev - the device files are stored here.

/lib - System library files.

/lost+found -provides a lost+found system for the files under the root.

/media - The devices are mounted to a mount point in the hard disk, so that it can be accessed as files. These mount points are stored under this directory. So external devices like CD rom are accessible here.

/mnt - Mounted file systems.

/opt - Provides a location for optional applications to be installed.

/proc -Information about the state of the system inculding the current running process.

/sys - System Files.

No comments: