Understanding Linux directory structure

Everything is so organized in Linux but when one don’t know the use and purpose of different directories in Linux it becomes messy. Following is a brief on different directories that are present in Linux and what they are used for.


/ :  is the parent directory for all the other present directories in Linux.

/root  :  This is the home directory for root user.

/bin : bin is an abbreviation of Binaries. It’s just a directory where a user of an operating system can expect to find applications for example it contains binaries for different command like cat, mv, cp, echo etc.

/boot : boot holds important files including Kernel, grub required during the Linux boot process.

/dev :  this directory contains all the special device files for all the hardware devices present on the machine for example the hard drive files sda, sdb.

/etc :  the /etc directory contains all the configuration files for all different application / services that are running on the Linux. You can find files related network, user configuration etc.

/home : this is the directory where all the users store their files (excluding root) .  Whenever a new user is created a new directory is created under /home something like this /home/boo /home/foo.

/lib : lib directory contains Linux kernel modules and the shared library images required to boot the system and run the commands in root filesystem.

/lost+found : fsck – “files system check” command checks your filesystem for broken files if it finds any such files it places them into /lost+found directory

/media : Inside media temporary mount directories are created for different removable devices like Pendrives.

/mnt : this is used for temporary mounting of file system.

/opt : this is an abbreviation of Optional. It contains third party applications like java etc.

/proc : this is a process information pseudo-file system. It contains runtime system information such as system memory, devices mounted, hardware configuration, etc

/run : there are services and daemons that run very early during the startup process, /run is a standardized file system location available where they can store runtime information.

/sbin : Same as /bin this directory also contains executable binaries / commands but these commands are related to system administration and can’t be executed by normal users.

/sys : this is a virtual file system which stores and allows modification of the devices connected to the system.

/tmp : This is the directory where different temporary files are stored and in some distributions deleted on system reboot. This directory has Sticky bit permission to it which means any user can create the files / directories but they can only modify be modified by owner or root.

/usr : it contains all the user binaries, their documentation, libraries, header files, etc. User programs like telnet, ftp, etc are also placed here.

/var : var stands for variable the size of files here is expected to grow. It contains log files backup files etc.

310 Replies to “Understanding Linux directory structure”

  1. Hi my family member! I wish to say that this post is awesome, great written and come with approximately all vital infos.
    I would like to peer more posts like this .

  2. [url=https://wellbutrinlab.com/]buy wellbutrin[/url] [url=https://indocinmed.com/]generic indocin[/url] [url=https://retinaotc.com/]xenical generic price[/url] [url=https://albuterolsale.com/]albuterol sulfate inhaler[/url] [url=https://propecialab.com/]buy propecia in canada[/url] [url=https://acyclovirzov.com/]acyclovir 300mg[/url] [url=https://tretinoinsale.com/]tretinoin gel buy online[/url] [url=https://atorvastatinlipitor.com/]lipitor 20 mg generic[/url] [url=https://zoloftgen.com/]zoloft 500mg[/url] [url=https://diflucanmed.com/]can i buy fluconazole online[/url] [url=https://doxycycline360.com/]doxycycline cap tab 100mg[/url] [url=https://lexapro10.com/]generic lexapro cost[/url] [url=https://advair1.com/]generic advair diskus[/url] [url=https://valtrexx.com/]valtrex 500[/url] [url=https://clomidpill.com/]clomid for men[/url] [url=https://celebrexcap.com/]celebrex 200 mg price[/url] [url=https://lisinopriltab.com/]buy lisinopril[/url] [url=https://stratteramed.com/]strattera cost[/url] [url=https://antabusedsuf.com/]antabuse buy[/url] [url=https://albendazoleotc.com/]cheap albendazole[/url]

Leave a Reply

Your email address will not be published. Required fields are marked *