Wednesday, 3 February 2016

Linux File System

The Linux file system is the structure in which all the information on your computer is stored. In fact, one of the defining properties of the
UNIX systems on which Linux is based is that nearly everything you need to identify on your system (data, commands,symbolic links, devices directories) is represented by items in the file systems. Knowing where things are and understanding hoe to get around fliest from shell are critical skills in Linux.

In Linux the files are organized within hierarchy of directories .Each directory can have files ror other directories. You can go to another directory or file by using either the full the full path (/home/fahad/myfile.txt) or a relative path  (for example /home/fahad were your current directory , you could simply refer to the file as myfile.txt.

The Linux file system looks like a tree upside-down. At the very top is the root directory  (do not confuse with the root user) it is represented by a single slash(/). This is illustrated in the figure below.

Fig (1)

These Linux directories may interest you

  1. /bin -- Contains common Linuxx user commands, e.g ls,sort,date and chmod
  2. /boot -- Has the bootable Linux kernel and boot loader configuration (GRUB).
  3. /dev -- Contains files representing access points to devices on your systems. These can be of different types e.g  terminal devices (tty*), floppy disks (fd*), hard disks (hd*).
  4. /etc -- Contains administrative configuration files. These files can be edited.
  5. /home -- Contains directories assigned to each regular use with a log in attempt.
  6. /media -- Provides a standard location for automounting devices. (removable media in particular).
  7. /lib -- Contains shared libraries needed by application in /bin/ and /sbin to boot the system.
  8. /mnt -- A common mount point  for many devices before it was supplanted by the standard /media directory. Some bootable Linux systems still use this directory.    
  9. /misc -- A directory sometimes used to auto mount file systems upon request.
  10. /opt -- Directory structure available to store add-on application software.
  11. /proc -- Contains information about system resources.
  12. /root -- Represents the user's home directory. The home directory for root does not reside beneath  /home for security reasons.
  13. /sbin -- Contains administrative commands on daemon processess.
  14. /tmp -- Contains temporary files used by applications.
  15. /usr -- Contains user documentation games,graphical files (X11), libraries (lib) and variety of other commands..
  16. /var -- Contains directories of data used by various applications.   

No comments:

Post a Comment