linux–3– directory structure from zero single row

Source: Internet
Author: User

linux–3– directory structure from zero single row

1, FHS Standards (filesystem hierarchy Standard)

Why –> in order to standardize, and for the development of Linux

Key –> specification What data should be placed in each specific directory

What? –> defines what data should be placed under the three-tier directory {

1./root directory: Place data related to the boot system

2./usr (Unix software rescource): With the installation of the software

Close data

3./var: data related to the system operating process

}

The root directory should not be placed in a very large partition, the smaller the better, the first is to improve performance, two is not prone to problems

2. The FHS definition should have those subdirectories under the root directory {

/bin system has a lot of execution files, the general user can use, single-user mode

Commands that can be manipulated

/boot files that are used to boot, including the Linux kernel files and the boot menu,

Configuration file

/dev Place device and interface device file {

/dev/null similar to a black hole action: Prohibit standard error

Prohibit the standard output

/dev/zero is also a pseudo-file used to temporarily swap files

/dev/hd*–>ide Device Hard Drive

/DEV/SD*–>SCSI Equipment

/dev/tty[0-63]–> Virtual Terminal

/dev/ttys–> Serial Port

/dev/ram*–> Memory

/dev/lp–> and the same mouth

}

/etc System The main configuration file is placed in this directory, account number, password,

Start file, group name for various services. The average user is able to query

, only the root permission can be modified. FHS does not recommend placing

The executable file (binary) is in this directory. The more important {

The default configuration for Inittab–>runlevel is here

Init.d–> The default startup scripts for all services are placed here

}

/home here system Default User main folder, main your personal data,

/home/User Name

/lib a library of functions to be used in the boot, and the/bin or/sbin

The function library that the command invokes.

/lib/modules, placing kernel-related modules (drivers)

/media Media in English, the following removable devices, such as the CD-ROM drive, floppy drive

/misc Miscellaneous drive Places to place

/MNT mount certain additional equipment, such as the U-disk

Mount refers to a device that is hooked up to an existing directory by accessing the

Directory to access the device

/net is related to the network, a mount point of the network directory

/opt the directory where third-party software is placed, such as Java,realplay installed by itself

/root the system administrator's home folder

/proc This virtual file system, the data is placed in the memory, such as

The kernel of the system, the process, itself does not occupy hard disk space.

/sbin only system administrator can use, other users can only query, set the system environment

The difference between commands, fixes, and restore systems such as these commands, * * and/bin {

Function:/sbin belongs to the basic system, Shutdown,reboot,

Start the system and repair the system.

/bin some common basic commands, such as Ls,chmod

User's permissions:/sbin The following commands are usually only available to administrators

To run

/bin administrators and general users can use the

}

/selinux the data of this directory is also in memory, does not occupy the hard disk capacity, he is

One of the important plugins of the Linux kernel.

/SRV service abbreviations are the data directories that are needed after the network service is started

For example: www,ftp

/tmp similar to temporary folders, anyone can access, so do not put the important number

It's under this directory.

/lost+found when a file system error occurs, some of the missing files are

Geofang this directory. such as illegal shutdown, this directory will be put

These files.

Similar to/sys and Proc, it is also a virtual file system that mainly records kernel-related

Some information, including: currently loaded kernel modules and kernel detected by the hard

Device information.

/usr This is the directory where the UNIX operating system software resources are placed, not the number of users

It is important to note this. For developers, do not create a new directory on their own

Below this. The system's default software is placed under this/usr. Class

Like Windws's C:\window + c:\program Files, these 2 directories have a

The binding body.

/var This directory will not gradually take up hard disk capacity until it runs. Cache files, Login

files, files generated by certain software operations, such as database files, etc.

}

3, need to pay attention to is:

root directory and system boot related, root directory and which directories can not be placed into different partitions {

/etc configuration file

/bin Executing files

/dev Device files

/lib required for the function library and kernel required to execute the file

/sbin System Execution files

}

4. Absolute path and relative path

a/b/c/d/e Windows/java/jre/tolls.jar

Windows/java2/jre2/tools2.jar

linux–3– directory structure from zero single row

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.