Directory Structure: Linux

Spread the love

It is very important to know about the Linux directory structure. I most of the case if you work as a System Administrator, you have to work in bash/ multiuser mode / black screen with no graphical interface and only commands of Linux will be used. If you don’t know where to go and in which folder which file are kept or where from a file can be copied or moved you will get stuck.

 

 

The image shows the complete Linux (CentOS7 / RHEL 7 ) directory structure. Let’s get to know where we will find which file/ folder and which directory is used for which purpose.

/ (root) Parent of all directories
/root Root users (administrator) profile or home directory
/home Normal users profile or home directory
/bin Normal users commend in binary format by system admin
/sbin Super users commend in binary format
/mnt Hook to connect removable drive /disks
/media Automatic mount point by System
/etc System and server configuration files
/var All log files location, web and FTP server’s document root
/usr All local program installation location and all documentation folder
/dev All device files location which is required to access HW
/tmp All temporary file locations (runtime files)
/proc All running processes(PID), system virtual files, cup memory states
/sys System file location (kernel files)
/opt All optional file location (external files/software install location) – while OS gets new updates, it won’t touch this directory as it’s a mother software directory
/lib Libraries for 32-bit files
/lib64 Libraries for 64-bit files
/srv Service-specific data
/boot Booting files (if missing machine won’t start)
/run Runtime files

 

Hope I  am able to explain which directory is allocated for which purpose in short. Anyway, I don’t know about others but honestly, it felt like pretty much boring and monotonous when I know about the structures and now I feel like, it worth my time learning them.

Knowledgebase: 

  • Linux has 3 types of users:
    • Super User (root)  : UID = 0  [ $ ]
    • Normal User: UID = 1000~90,000 [ # ]
    • Application/ System User: UID = 1-999
  • Bash:  An interpretator to send inputted commend to Linux Kernel
  • Linux is a Multitusking OS:  2 types of consoles
    • Physical Console (monitor, keyboard) – Ctrl+Alt+F1
    • Virtual Console – Ctrl+F2~F6
Series Navigation<< Installation: Cent OS 7 Linux distributionPrivate: Commend Line Basics: Linux >>