The Linux Directories

10
Oct
0

The root (/) directory

The root directory begins with the / symbol

The /bin directory

This directory stores system binaries or programs used to oeprate the system. Non-critical programs or binaries are stored in the /usr/bin directory.

The /boot directory

This directory holds all the files needed to boot the system, except the configuration files. Files included are the kernal, boot loaders, and message files defining the text printed on the loading screen.

The /dev directory

This directory stores all devices used to access different hardware components in the system. Some devices are disk drives, floppy disks, tap drives, terminals, console, serial ports, parallel ports, and sound card.

To view devices currently connected on your computer

cd /dev

ls -lk

The /etc directory

This directory contains a variety of system configurations files needed for system initilization. All users can read files in this directory but only administrators can execute the files.

The /home directory

The /home directory is to store user’s home directory. The root’s home directory is located inside /root instead.

The /lib directory

This directory stores shared libraries allowing Linux’s executables to have smaller file size and denser features without the need of recompiling.

The /mnt directory

This directory to store references to external file systems or devices.

TheĀ  /opt directory

This directory is a holdover from Unix where /opt hosts additional or add-on software.

The /proc directory

This directory hold dynamic information generated from related system processes such as the kernal, network devices, etc…Each process is a folder with permission to access the process environment. Use ls -l to view long listing type of this folder.

ls -l

The /root directory

Not to be confused with the / directory, the /root directory is the home directory for root user.

The /sbin directory

This directory contains executables that can only be run by the root users. Many of these executables are essential for booting up the system.

The /tmp directory

This folder is used to store temporary files that lasts only a short period of time. This is an efficient way to manage files since most of these temporary files get deleted after a restart of the system or after a termination of a program.

The /usr directory

This directory is enormous that comes with a directory structure of its own.

The /usr/bin directory stores non-critical system executable files, even most of them are launched on a basis.

The /usr/dict directory stores spell checking command files.

The /usr/etc directory used to store configuration files but now no longer used for that purpose.

The /usr/games directory does not have to hold third party games but can be used for that purpose.

The /usr/include and /usr/lib are used to store the C compiler’s include and library files.

The /usr/sbin directory does not store critical system administration file.

The /var directory

Usually user mailboxes, system log files, and spool logs are stored in this directory.

The /var directory

The /var directory

lock – lock files for system processes

log – log files for login/logout, current users, syslog, httpd, ftpd, mail, and spool file.

run – files created for the current system run level.

spool – data that has been spooled for processing, such as print jobs.

state – system state variables.