Linux Disk Management: initial knowledge of Linux file systems

Source: Internet
Author: User
Tags temporary file storage

Linux file system contains files arranged on disk or other directory, Linux system directory also contains subdirectories, and the win series is different from the win is different disk drives (that is, drive letters C, D, E) to use a different file system, and Linux is a tree structure, to/ As a directory extension, this is one of the Linxu Basic laws: The basis of all documents.



Such a large tree structure also creates the flexibility of the Linux file system, which has a file system on every chunk device, such as a hard drive partition, CD-ROM, or floppy disk. Typically, the kernel initiates this mounting process by mounting the file system on/off some hard drive partitions, associating the additional file system with an existing directory on the root filesystem, and thus making this directory an entry for other file accesses called mount.


Precautions:

For example, now you want to mount Cd-rom/dev/sr0 at Mount point/media/cdrom. The mount point must first exist before it can be mounted on the CD-ROM. When you mount the CD-ROM, the files and subdirectories on the CD-ROM become files and subdirectories under/media/cdrom. All files or subdirectories that are already in/media/cdrom will no longer be visible, but they still exist on the block device that contains the mount point/media/cdrom. If you uninstalled the CD-ROM, the original files and subdirectories will be visible again. Therefore, do not place other files in the directory that will be used as mount points to avoid this problem.



Overview of common directories and functions in FHS

/bin: A basic command for all users, a program that cannot be associated to a separate partition, and that is used by OS startup;

/boot: Boot file directory, kernel file (vmlinuz), boot loader (bootloader, grub) are stored in this directory;

/lib: Basic shared library files, and kernel module files (/lib/modules);

/LIB64: Dedicated to the storage location of the secondary shared library files on the x86_64 system;

/etc: Configuration file directory (plain text file);

/home/username: General user home directory;

/root: Administrator's home directory;

/media: Portable mobile device mount point;

/MNT: Temporary file system mount point;

/OPT: The installation location of the third-party application;

/SRV: Data used by services running on the system;

/tmp: temporary file storage location;

/usr:universal GKFX, read-only data;

/var:variable Data files

/proc: A virtual file system for outputting kernel-related process information;

/sys: A virtual file system for outputting information about hardware devices on the current system;

/selinux:security the storage location of information such as enhanced linux,selinux related security policy;

[[email protected] /]# lltotal 36lrwxrwxrwx.   1 root root     7 Dec  4  2014 bin -> usr/bindr-xr-xr-x.    4 root root 4096 Dec  4  2014 bootdrwxr-xr-x    19 root root 3080 feb 23 23:09 devdrwxr-xr-x.  85  root root 8192 feb 24 14:42 etcdrwxr-xr-x.   3 root  root   18 dec  4  2014 homelrwxrwxrwx.   1  root root    7 Dec  4  2014 lib ->  usr/liblrwxrwxrwx.   1 root root    9 dec  4   2014 lib64 -> usr/lib64drwxr-xr-x.   2 root root     6 Jun 10  2014 mediadrwxr-xr-x.   2 root root    6  Jun 10  2014 mntdrwxr-xr-x.   3 root root   15  Dec  4  2014 optdr-xr-xr-x  115 root root     0 feb 23 23:09 procdr-xr-x---.    5 root root 4096  Feb 24 14:50 rootdrwxr-xr-x   28 root root  860  Feb 24 15:21 runlrwxrwxrwx.   1 root root    8  Dec  4  2014 sbin -> usr/sbindrwxr-xr-x.   2  root root    6 jun 10  2014 srvdr-xr-xr-x    13 root root    0 feb 23 23:09 sysdrwxrwxrwt.  10  root root 4096 feb 24 15:32 tmpdrwxr-xr-x.  13 root root 4096 dec   4  2014 usrdrwxr-xr-x.  22 root root 4096 Feb 23  23:09 vardrwxr-xr-x.   3 root root 4096 dec  4   2014 vmwaretools



Linux Disk Management: initial knowledge of 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.