Linux operating system file BASICS (1)

Source: Internet
Author: User

The following is a detailed description of the basic knowledge of the Linux operating system file system. It should be useful to many friends who do not have full knowledge of the Linux operating system. Therefore, you can learn from the following. Hope to help you.

I. Linux File structure

The file structure is the method of organizing files stored on disks and other storage devices. It is mainly reflected in the organization of files and directories. Directory provides a convenient and effective way to manage files. Linux uses a standard directory structure. During installation, the installer has created a file system and a complete and fixed directory structure for the user, and specify the role of each directory and the file type. /Root directory

 
 
  1.                               ┃  
  2. ┏━━┳━━━┳━━━┳━━━╋━━━┳━━━┳━━━┳━━━┓  
  3. ┃   ┃      ┃     ┃     ┃     ┃      ┃     ┃     ┃  
  4. bin  home    dev     etc     lib     sbin    tmp      usr    var  
  5.                       ┃                               ┃  
  6.                   ┏━┻━┓     ┏━━┳━━┳━━┳━┻━┳━━┓  
  7.                   ┃      ┃    ┃   ┃    ┃    ┃     ┃    ┃  
  8.                  rc.d   cron.d X11R6  src   lib   local    man  bin  
  9.                   ┃                                
  10. ┏━━━┳━━┳━┻━┳━━━┓          
  11. ┃      ┃    ┃      ┃      ┃  

Init. d rc0.d rc1.d rc2.d ...... Linux bin lib src
Linux uses a tree structure. The top layer is the root directory. All other directories are generated from the root directory. Microsoft's DOS and windows also adopt a tree structure, but in DOS and windows, the root of such a tree structure is the disk drive letter of the disk partition. There are several partitions with several tree structures, the relationship between them is parallel. However, in linux, no matter how many disk partitions are managed by the operating system, such a directory tree has only one. In terms of structure, the tree directories on each disk partition are not necessarily tied.

If this is difficult to understand, let me give you an example:
One hard disk is divided into four partitions: //;/boot;/usr and windows fat.
For/AND/boot or/and/usr, they are subordinate; For/boot and/usr, they are parallel.
If I mount the fat partition in windows to/mnt/winc, what is the mount ?? Oh, don't worry, huh, just talk about it later, just talk about it later .) For/mnt/winc and/usr or/mnt/winc and/boot, they are two branches that do not have any relationship with the directory tree.

Because linux is a multi-user system, developing a fixed directory Plan helps to manage system files and different user files in a unified manner. However, this is a headache for many beginners who have switched from windows to linux. The functions of some main directories in linux are listed below.
/Bin binary executable command
/Dev special file
/Etc system management and configuration file
Configuration files and scripts started by/etc/rc. d
The base point of the/home user's home directory. For example, if the user's home directory is/home/user, you can use ~ User
/Lib standard programming library, also known as dynamic link shared library, works similar to. dll files in windows
/Sbin system management command, which stores the management program used by the system administrator.
/Tmp public temporary file storage point
/Root: The main directory of the system administrator)
/The mnt system provides this directory for users to temporarily Mount other file systems.
The/lost + found directory is usually empty, and the system shuts down abnormally, leaving a "Homeless" file named. chk in windows) here.
/Proc virtual directory, which is the ing of system memory. You can directly access this directory to obtain system information.
/Var overflow of some large files, such as log files of various services
The/usr directory contains almost all the applications and files to be used. Including:
/Usr/X11R6 directory for storing X Windows
/Usr/bin numerous applications
/Usr/sbin hyperuser Management Program
/Usr/doc linux document
Header files required for developing and compiling applications in/usr/include linux
/Usr/lib common dynamic link library and software package configuration file
/Usr/man help document
/Usr/src Source Code. The linux kernel source code is stored in/usr/src/linux.
/Usr/local/bin commands added locally
/Usr/local/lib: locally added Library

Click "basic knowledge of Linux Operating System File System" below to continue viewing.

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.