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.
These Linux directories may interest you
- /bin -- Contains common Linuxx user commands, e.g ls,sort,date and chmod
- /boot -- Has the bootable Linux kernel and boot loader configuration (GRUB).
- /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*).
- /etc -- Contains administrative configuration files. These files can be edited.
- /home -- Contains directories assigned to each regular use with a log in attempt.
- /media -- Provides a standard location for automounting devices. (removable media in particular).
- /lib -- Contains shared libraries needed by application in /bin/ and /sbin to boot the system.
- /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.
- /misc -- A directory sometimes used to auto mount file systems upon request.
- /opt -- Directory structure available to store add-on application software.
- /proc -- Contains information about system resources.
- /root -- Represents the user's home directory. The home directory for root does not reside beneath /home for security reasons.
- /sbin -- Contains administrative commands on daemon processess.
- /tmp -- Contains temporary files used by applications.
- /usr -- Contains user documentation games,graphical files (X11), libraries (lib) and variety of other commands..
- /var -- Contains directories of data used by various applications.