Linux standard directory structure (FHS)

Source: Internet
Author: User
Tags parent directory

The directory structure of all UNIX and Unix-like operating systems is an upside down tree structure starting with the root

Path
The so-called path is the directory composition structure
A Linux path consists of the "/" and the directory (file) name two parts
For example:/etc/passwd
If "/" appears at the beginning of the path, it represents the root directory, where "/" appears in the middle of the path, meaning that a
directory, the path shown above means "etc directory under the root directory"
passwd file "
If "/" appears at the end of the path, it indicates that this is a directory

Paths are divided into two categories: absolute and relative
Absolute path: The path that starts at the root
For example:/etc/sysconfig//etc/grub.conf

Relative path: The path where the non-root begins
For example: etc var/ftp/pub. /test.txt./test.sh

Use the PWD command to view the current absolute path:
PWD: Print Work Directory
Like what:
[Email protected] etc]# pwd
/etc

To switch paths:
The most common use is the CD command, full name: Change Directory
Like what:
#cd//switch to the home directory of the currently logged in user
#cd test//Switch to the test directory in the current directory
#cd-//switch to the last-visited directory
#cd: Switch to parent directory
======================================
directory role must be known
All first-level directories under the root directory are all due to the installation software "filesystem"

/USR software default installation directory, similar to the programs directory within the Windows system
The files of the software installed in the system will be stored in the various subdirectories
/USR/LOCAL/SRC typically stores downloaded source installation files
/USR/SRC typically stores downloaded source installation files

/bin directory/usr/bin symbolic link to store commands that everyone can use
/sbin directory/usr/sbin symbolic link to store only the commands that are available for root

/proc virtual File system mapping the current kernel state system process Files directory
Cpuinfo CPU Information
Meminfo Memory Information
/sys virtual file system, and proc is different if the hardware device does not have a plug-and-pull operation, its subdirectories
The recording structure does not change

Home directory for the/root root account
Home directory for all regular accounts

/etc Store configuration file

/var variable store some frequently changing files (directories for FTP publishing files, Web Publishing
Site Directory, log, mail, scheduled Tasks)
/lib
/LIB64 Library Repository files

/dev Storage device files
Common Equipment Files:/dev/sda,/dev/sda1,/dev/tty1,/dev/tty2,/dev/
PTS/1,/dev/zero,/dev/null,/dev/random

/boot store boot files, such as grub and kernel files

/media the directory used to automatically mount the graphics (Rhel7 is useless)
/runRhel7 New Additions to the catalogue, is the hard link of the/var/run, before the optical drive and the U disk since
Moving mount directory changed from/media to/run/media.
/MNT Manual Mount Directory

/opt empty directory, some software will also use it as the default installation directory

/cgroup Resource Control

/TMP stores temporary files and junk files that are not recycled due to software exit

/net/srv/selinux/lost+found These directories are seldom used at ordinary times.





This article from "crazywing" blog, reproduced please contact the author!

Linux standard directory structure (FHS)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.