Linux directory structure and details
Linux common directory structure of Centos/Ubuntu
Use of directory’s
1. contains user(Essential) command binaries (executable file)
2. Examples: /bin/top,/bin/mv,/bin/cut,/bin/cp,/bin/rename,/bin/mkdir,etc…
1. contains boot related file
2. Examples: grup, boot loader,kernel
1. contains internal attached device details
2. Examples: /dev/sda,/dev/sdb,/dev/sdc,/dev/cdrom
1. contains configuration related files
2. Examples: httpd.conf,hosts,reslov.conf,smb.conf,etc….
1. contains all users home directories
2. Examples: /home/secureethics,/home/bala
1. contains 32 bit Libraries for the binaries
1. contains 64 bit Libraries for the binaries
1. Used for mount point of removable media
2. Examples: CD-ROM, Pendrive
1. Used for temporary mounting point
2. Example: NFS,SMB,etc
1. Used for third party application installations
- /proc –
1. contains running process information
2. Examples: /proc/meminfo,/proc/mdstat,/proc/cpuinfo,etc…
- /root –
1. root user(super user) home directory
2. Examples: /root/
1. used for stored the run time application/service files(It will store file temporary )
1. contains system command binaries (executable file)
2. Examples: /sbin/service,/sbin/sshd,/sbin/smbd.
1. Contains server specific services related data.
2. Example: /srv/cvs
1.contains device drivers,firmware
2. Examples: /sys/drivers,/sys/firmware,/sys/bus
1. var stands for variable files.
2. Content of the files that are expected to grow can be found under this directory.
3. This includes — system log files (/var/log); packages and database files (/var/lib); emails (/var/mail); print queues (/var/spool); lock files (/var/lock); temp files needed across reboots (/var/tmp);
1. Directory that contains temporary files created by system and users.
2. Files under this directory are deleted when system is rebooted.
1. Contains binaries, libraries, documentation, and source-code for second level programs.
2. /usr/bin contains binary files for user programs. If you can’t find a user binary under /bin, look under /usr/bin. For example: at, awk, cc, less, scp
3. /usr/sbin contains binary files for system administrators. If you can’t find a system binary under /sbin, look under /usr/sbin. For example: atd, cron, 3. sshd, useradd, userdel
4. /usr/lib contains libraries for /usr/bin and /usr/sbin
5. /usr/local contains users programs that you install from source. For example, when you install apache from source, it goes under /usr/local/apache2