In-depth introduction to the Linux File System organization structure and Installation

Source: Internet
Author: User

After a long time learning about the official version of Linux Files, Linux can improve the performance of computer operations. The following describes the structure of the Linux File System. Linux is an open-source operating system that originated from the idea of LinusTorvaldsLinux, short for Linus's UNIX at the University of Helsinki, Finland, as early as October 1991. Linux itself is the core part of the operating system, that is, the kernel of the operating system.

The organizational structure of the Linux file system is as follows: the entry to the organizational structure of the Linux File System is also the highest level directory;
The commands required by the basic system are located in this directory, which is also required by the minimum system. commands such as ls, cp, and mkdir are similar to/usr/bin, all files in this directory are executable and can be used by common users.

The kernel of the Linux File System and the files required by the boot system program, such as the vmlinuz initrd. img file, are located in this directory. In general, GRUB or LILO System Boot manager is also located in this directory; device file storage directory, such as sound card and disk. the location of the system configuration file, where some server configuration files are also located; for example, user account and password configuration files; default directory for normal user's home directory; library file directory

In the ext2 or ext3 file system, some file fragments are generated when the system crashes or the machine shuts down unexpectedly. When the system is started, the fsck tool checks this and fixes corrupted file systems. Sometimes a system problem occurs. Many files are moved to this directory and may be repaired manually or moved to the original location.

The mount point of the plug-and-play storage device is automatically created under this directory. For example, after the USB disk is automatically mounted, a directory is generated under this directory. After CDROM/DVD is automatically mounted, A directory will also be created in this directory, similar to the cdrom directory. This is available only on the latest release kit, such as Fedora Core 4.0 5.0. See the definition of/etc/fstab. It is often used to mount a file system, either locally or remotely.

This directory is generally used to store the mounted directory of the mounted storage device, such as a directory such as cdrom. See the definition of/etc/fstab. Sometimes we can enable the system to automatically mount the file system at startup and put the mount point here. It mainly depends on the definition in/etc/fstab. For example, the optical drive can be mounted to/mnt/cdrom.

Optional. Some software packages will also be installed here, that is, custom software packages. For example, in Fedora Core 5.0, OpenOffice is installed here. Some software packages compiled by ourselves can be installed in this directory. The software installed through the source package can be customized through./configure -- prefix =/opt.

When the operating system is running, process information and kernel information, such as cpu, hard disk partition, and memory information, are stored here. The/proc directory is the mounted directory of the file system proc disguised. proc is not a real file system. For its definition, see/etc/fstab.

The root directory of the super-Permission user root in the Linux File System is mostly used to store commands related to system management. It is the place where the super-Permission user root can store executable commands, normal users have no permission to execute commands in this directory. The directory is similar to/usr/sbin,/usr/X11R6/sbin, or/usr/local/sbin; temporary File directory. Sometimes, when a user runs a program, a temporary file is generated. /Tmp is used to store temporary files. The/var/tmp directory is similar to this directory.

This is the directory where the system stores programs, such as commands and help files. This directory contains many files and directories. Most of the software packages officially provided by the organizational structure release of Linux are installed here. If a server configuration file is involved, the configuration file will be installed in the/etc directory. The/usr directory contains: The font directory/usr/share/fonts, the help directory/usr/share/man, or/usr/share/doc, common users can execute the file directory/usr/bin or/usr/local/bin or/usr/X11R6/bin. The root executable command can be stored in the directory, for example,/usr/sbin or/usr/X11R6/sbin or/usr/local/sbin;
There is also the program header file directory/usr/include.

The contents of this directory are changed frequently. We can understand it as the abbreviation of vary./var/log under/var is the directory used to store system logs. The/var/www directory defines the directory where the Apache server site is stored;/var/lib is used to store some library files, such as MySQL and the location where the MySQL database is stored;
The following describes the usage of some important directories;

This directory is used to store the scripts started by the System or server in System V mode, which is common in Systems started or initialized in System V mode. For example, Fedora/RedHat;
If the server runs in xinetd mode, put its script in this directory. Some systems do not have this directory, such as Slackware, and some old versions do not. In Rehat/Fedora, a new version is compared.
This is a directory in the Slackware release, where the bsd startup script is stored, such as defining the NIC and enabling the script on the server. It is the location where X-Windows-related configuration files are stored;
For example:
[Root @ localhost ~] #/Etc/init. d/sshd start Note: start the sshd server
[Root @ localhost ~] #/Etc/init. d/sshd stop Note: stop the sshd server
Start sshd: [OK]
This is a typical sshd server startup script in System V mode. You can run this script to start the sshd server.

This directory is the directory of executable programs, and normal users have the permission to execute them. When we install a program from a software package that comes with the system, most of its executable files will be placed in this directory. For example, when installing the gaim software package. A similar directory is/usr/local/bin. Sometimes the file in/usr/bin is a link file of/usr/local/bin;
This directory is also the directory of executable programs, but mostly stores commands related to system management. Only the root permission can be executed. Similar directories include/sbin or/usr/local/sbin or/usr/X11R6/sbin;

This directory is generally used to store the user's self-compiled and installed software. It is generally installed through the source code package. If the installation directory is not specified, it is generally installed in this directory. This directory contains subdirectories. Let's take a look.
Similar to the/lib directory, it is the storage directory of library files;
The storage location of shared items in the system. For example,/usr/share/fonts is a font Directory, which is shared by users. /Usr/share/doc and/usr/share/man help files are also shared;

Linux File System organization structure is the directory of the kernel source code storage, the following kernel source code directory, such as Linux File System organization structure, linux-2.xxx.xx directory, etc. Some systems also install the source code package here. For example, Fedora/Redhat. When we install file. src. rpm, these packages will be installed in the corresponding directory of/usr/src/redhat. In addition, the Directory of the source code package of the Fedhat 4.0/5.0 kernel is located in a directory under the/usr/src/kernels directory and the corresponding directory is generated only after installation ); the package installation information, logs, and management information are stored in the Slackware operating system. It does not seem to exist in Fedora. System log storage. The analysis log depends on the contents in this directory; the printers, emails, proxy servers, and other offline directories;

  1. Brief Introduction to Linux File System Operations
  2. Introduction to Linux File System partitions
  3. Learning diary: Linux File System Restrictions and features
  4. Introduction to the relationship between Linux File System Development and other file systems
  5. Ext3 and Reiserfs are bad Linux file systems.

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.