Linux Learning Notes (i)-Basic concepts and file structure (FHS)

Source: Internet
Author: User

One: Linux philosophy thought

1 All Documents

Open,read,write,close

2, composed of a number of single-purpose programs, a program to do only one thing.

3 combination Purpose A single small program to complete complex tasks

4 try to avoid interacting with users

The command tries to avoid user intervention from the execution to the end of the process. Easy to write scripts, programming

5 Saving configuration information using a text file (using ASKMA)

6 providing a mechanism rather than a policy


II. Architecture of Linux file system

File system: Hierarchically, all files start from the root

/: root, Kernel direct reference

After the Linux partition, there is a partition that is the entry point of the operating system, the "root" partition. Other partitions cannot be accessed directly as portals. Other partitions can be associated with other directories of the root partition.


Three, the Linux file directory structure standard: FHS


FHS: Defines the criteria for the file directory, what files should be included, and what each file is intended for

/bin: Binary file, executable program

/sbin: Management class programs that administrators can use to manage class commands

The operating system itself needs to be used to boot


/usr/bin:

/usr/sbin:

In order to accomplish some specific work, the operating system has some functionality. The default many programs will be placed here, generally will be larger than


/usr/local/bin

/usr/local/sbin:

In order to install third-party programs, such as Oracle,mysql


/boot: Boot program, kernel, Ramfs file, bootloader (GRUB);


/dev: Device file storage directory: Special files

/etc: Stores directories in the configuration file set.

/etc/sysconfig: System-level application configuration, such as network card configuration, firewall configuration

/ETC/INIT.D: System service script-related files related to system RunLevel


/home: Normal user, by default there is a family directory with the same username

/root: Administrator's home directory

/LIB,/LIB64: The library file, which is usually installed by the installer, is also called to the library file. The library files for the/usr/bin,/usr/sbin,/bin./sbin installer are stored in both directories, but the programs installed under/usr/local/bin,/usr/local/sbin are stored in

, the default system does not look up to the above directory when it needs to call the library to run the program .


/lost+found: Files that have not been saved and not attributed will be stored here.


/media: All files are only attached to the root directory to be accessible, media is a dedicated mount location, mainly used to hang debt portable devices, such as Cd,usb

/MNT: Used to hang on an additional storage device, such as a hard drive in a chassis, or remotely.


/misc: Alternate directory, generally no use

/OPT: Optional directory, alternate directory, usually used to install third-party software, in the early days, no/usr/local/bin,/usr/local/sbin will be installed in this directory, some strange programs will be installed in this directory

/proc: This directory shows the files are not files, such as modifying some running kernel configuration file parameters, the general system will not be able to enter the modification parameters after startup, so some parameters mapped to files, placed in this directory. This directory is a pseudo file system. Some can be changed, some cannot be changed, and can only be read. You can modify the parameters of the kernel by changing these files. The shutdown will not exist. It's just a map when the system is running.

/sys: Pseudo file system, hardware-related configuration parameters, such as the parameters of a hard drive. Parameters for configuring peripheral devices

/srv:service, which provides data for a service, provides a Web server's Web page data, but is generally not used.

/tmp: The temporary file system is deleted by default for more than 30 days. Users are not able to delete files created by others under, temp

/usr:shared,readonly. Windows-like program file

/usr/include: Header File

/var: frequently changing files, just after the system/var is empty, but when the system has been running for a period of time,/var will be very large. Often dealing with

/var/log

/var/lock

/var/run

/var/cache


Try to use temp or your own home directory when creating your own files. Do not modify the above catalogue casually.


This article is from the "7995400" blog, please be sure to keep this source http://8005400.blog.51cto.com/7995400/1909386

Linux Learning Notes (i)-Basic concepts and file 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.