Linux Directory Structure Slides

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Linux Directory Structure

The Filesystem Hierarchy

LinuxTrainingAcademy.com
What You Will Learn
Linux directory structure.

Location of operating system components.

Application directory structures.

LinuxTrainingAcademy.com
Why?
● Increases your overall knowledge of Linux.
● Aids in navigation.
● Saves you time.
● Improves your troubleshooting skills.
● Makes you a better user and administrator.
● Enhances your overall experience of using
Linux.
LinuxTrainingAcademy.com
Common Directories
/ “Root,” the top of the file system hierarchy.
/bin Binaries and other executable programs.
/etc System configuration files.
/home Home directories.
/opt Optional or third party software.
/tmp Temporary space, typically cleared on reboot.
/usr User related programs.
/var Variable data, most notably log files.
LinuxTrainingAcademy.com
LinuxTrainingAcademy.com
LinuxTrainingAcademy.com
LinuxTrainingAcademy.com
LinuxTrainingAcademy.com
Comprehensive Directory Listing
/ “Root,” the top of the file system hierarchy.
/bin Binaries and other executable programs.
/boot Files needed to boot the operating system.
/cgroup Control Groups hierarchy.
/dev Device files, typically controlled by the operating
system and the system administrators.
/etc System configuration files.

LinuxTrainingAcademy.com
Comprehensive Directory Listing
/export Shared file systems.
/home Home directories.
/lib System Libraries.
/lib64 System Libraries, 64 bit.
/lost+found Used by the file system to store recovered
files after a file system check.
/media Used to mount removable media
(CD-ROMs, USBs)
LinuxTrainingAcademy.com
Comprehensive Directory Listing
/mnt Used to mount external file systems.
/opt Optional or third party software.
/proc Provides info about running processes.
/rootThe home directory for the root account.
/sbin System administration binaries.
/selinux Used to display information about SELinux.

LinuxTrainingAcademy.com
Comprehensive Directory Listing
/srv Contains data which is served by the system.

/srv/www Web server files.

/srv/ftp FTP files.

/sys Used to display and sometimes configure the


devices known to the Linux kernel.

/tmp Temporary space, typically cleared on reboot.


LinuxTrainingAcademy.com
Comprehensive Directory Listing
/usr User related programs, libraries, and docs.
/usr/bin Binaries and other executable programs.
/usr/lib Libraries.
/usr/local Locally installed software that is not part of
the base operating system.
/usr/sbin System administration binaries.
/var Variable data, most notably log files.
/var/log Log files.
LinuxTrainingAcademy.com
Application Directory Structures
/usr/local/crashplan/bin
/usr/local/crashplan/etc
/usr/local/crashplan/lib
/usr/local/crashplan/log

LinuxTrainingAcademy.com
Application Directory Structures
/opt/avg/bin

/opt/avg/etc

/opt/avg/lib

/opt/avg/log
LinuxTrainingAcademy.com
Application Directory Structures
/etc/opt/myapp

/opt/myapp/bin

/opt/myapp/lib

/var/opt/myapp
LinuxTrainingAcademy.com
Application Directory Structures
/usr/local/bin/myapp

/usr/local/etc/myapp.conf

/usr/local/lib/libmyspp.so

LinuxTrainingAcademy.com
Application Directory Structures
/opt/acme

/opt/acme/bin

/opt/acme/etc

LinuxTrainingAcademy.com
Application Directory Structures
/opt/google

/opt/google/chrome

/opt/google/earth

LinuxTrainingAcademy.com
Application Directory Structures
/opt/web-team

/opt/acme/web-team

/usr/local/acme/web-team

LinuxTrainingAcademy.com
Summary
The most common directories to know are:
/
/bin
/etc
/home
/opt
/tmp
/usr
/var
LinuxTrainingAcademy.com
Summary
Applications that are not part of the base OS
can be installed in:
/usr/local

/opt

LinuxTrainingAcademy.com

You might also like