Skip to main content

The Linux File System Hierarchy


All files on a Linux system are stored on file systems which are organized into a single inverted tree of directories, known as a file system hierarchy. This tree is inverted because the root of the tree is said to be at the top of the hierarchy, and the branches of directories and subdirectories stretch below the root. Significant file system directories in Red Hat Enterprise Linux 7
Significant file system directories in Red Hat Enterprise Linux 7
The directory / is the root directory at the top of the file system hierarchy. The / character is also used as a directory separator in file names. For example, if etc is a subdirectory of the / directory, we could call that directory /etc. Likewise, if the /etc directory contained a file named issue, we could refer to that file as /etc/issue.
Subdirectories of / are used for standardized purposes to organize files by type and purpose. This makes it easier to find files. For example, in the root directory, the subdirectory /boot is used for storing files needed to boot the system.

Note

The following terms are encountered in describing file system directory contents:
  • static is content that remains unchanged until explicitly edited or reconfigured.
  • dynamic or variable is content typically modified or appended by active processes.
  • persistent is content, particularly configuration settings, that remain after a reboot.
  • runtime is process- or system-specific content or attributes cleared during reboot.

The following table lists some of the most important directories on the system by name and purpose.
Important Red Hat Enterprise Linux Directories
Location Purpose
/usr Installed software, shared libraries, include files, and static read-only program data. Important subdirectories include:
  • /usr/bin: User commands.
  • /usr/sbin: System administration commands.
  • /usr/local: Locally customized software.
/etc Configuration files specific to this system.
/var Variable data specific to this system that should persist between boots. Files that dynamically change (e.g. databases, cache directories, log files, printer-spooled documents, and website content) may be found under /var.
/run Runtime data for processes started since the last boot. This includes process ID files and lock files, among other things. The contents of this directory are recreated on reboot. (This directory consolidates /var/run and /var/lock from older versions of Red Hat Enterprise Linux.)
/home Home directories where regular users store their personal data and configuration files.
/root Home directory for the administrative superuser, root.
/tmp A world-writable space for temporary files. Files which have not been accessed, changed, or modified for 10 days are deleted from this directory automatically. Another temporary directory exists, /var/tmp, in which files that have not been accessed, changed, or modified in more than 30 days are deleted automatically.
/boot Files needed in order to start the boot process.
/dev Contains special device files which are used by the system to access hardware.

Important

In Red Hat Enterprise Linux 7, four older directories in / now have identical contents as their counterparts located in /usr:
  • /bin and /usr/bin.
  • /sbin and /usr/sbin.
  • /lib and /usr/lib.
  • /lib64 and /usr/lib64.
In older versions of Red Hat Enterprise Linux, these were distinct directories containing different sets of files. In RHEL 7, the directories in / are symbolic links to the matching directories in /usr.

Comments

Popular posts from this blog

Special Permissions in linux

The setuid permission on an executable file means that the command will run as the user owning the file, not as the user that ran the command. One example is the passwd command: [student@desktopX ~]$ ls -l /usr/bin/passwd -rw s r-xr-x. 1 root root 35504 Jul 16 2010 /usr/bin/passwd In a long listing, you can spot the setuid permissions by a lowercase s where you would normally expect the x (owner execute permissions) to be. If the owner does not have execute permissions, this will be replaced by an uppercase S . The special permission setgid on a directory means that files created in the directory will inherit their group ownership from the directory, rather than inheriting it from the creating user. This is commonly used on group collaborative directories to automatically change a file from the default private group to the shared group, or if files in a directory should be

The Seven-Step Model of Migration

Irrespective of the migration approach adopted, the Seven-step Model of Cloud Migration creates a more rational point of view towards the migration process and offers the ability to imbibe several best practices throughout the journey Step 1: Assess Cloud migration assessments are conducted to understand the complexities in the migration process at the code, design and architectural levels. The investment and the recurring costs are also evaluated along with gauging the tools, test cases, functionalities and other features related to the configuration. Step 2: Isolate The applications to be migrated to the cloud from the internal data center are freed of dependencies pertaining to the environment and the existing system. This step cuts a clearer picture about the complexity of the migration process. Step 3: Map Most organisations hold a detailed mapping of their environment with all the systems and applications. This information can be used to distinguish between the

RequestsDependencyWarning: urllib3 (1.24.1) or chardet (3.0.4) doesn't match a supported version

import tweepy /usr/lib/python2.7/dist-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.24.1) or chardet (3.0.4) doesn't match a supported version!   RequestsDependencyWarning) Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/usr/local/lib/python2.7/dist-packages/tweepy/__init__.py", line 14, in <module>     from tweepy.api import API   File "/usr/local/lib/python2.7/dist-packages/tweepy/api.py", line 12, in <module>     from tweepy.binder import bind_api   File "/usr/local/lib/python2.7/dist-packages/tweepy/binder.py", line 11, in <module>     import requests   File "/usr/lib/python2.7/dist-packages/requests/__init__.py", line 97, in <module>     from . import utils   File "/usr/lib/python2.7/dist-packages/requests/utils.py", line 26, in <module>     from ._internal_utils import to_native_string   File "/usr/lib/python2.

tag