A brief explanation of Linux file systems and related mount commands

Source: Internet
Author: User
Tags file system

Linux file system

Like the concept of Windows C disk D disk, this "file system" or "organizational System" is the software level, is the Linux system "intrinsic" system, like a "thought" in your mind, does not need to rely on any reality.

: The Idea:linux system is organized in a way that the entire system starts from the root, according to the tree directory gradually expand downward, classified storage for different purposes of the file,/read "Slash", English slash; when it writes a path, the first/represents the root, that is, root, the other/represents the path delimiter, But all read as "Slash" or "slash".

OK, now let's turn "ideal" into "reality"!

: Idea: When the system starts, first there is a partition that is mounted/, as can be understood as the partition is assigned/this strange "letter" (note, in Windows, this symbol is used as a command parameter to guide the symbol, and the backslash, English backslash as a path separator, habits are different, Just like the British driving left, nothing strange.

The partition, which is mounted as/, is called the root partition (whether it is a primary partition or a logical partition). It has a special place in the Dour Linux system since then, because all the hard drives in the Dour computer, including all the other partitions on it, regardless of the primary partition, the logical partition, will have this "root partition" as the backbone, Start building a Linux tree and eventually become a branch or leaf on the tree. The entire Linux system structure, there is only one root (root partition), it is impossible to have a second (in fact, any one partition can be mounted as a/,windows partition can also.) Only the purpose of mounting the root partition is to boot the system, and it will not be able to boot the system without the Linux kernel and the system files it requires. So this root division is not mysterious).

: Idea: Your other partitions can only be mounted to a directory under/(root partition), such as "/mnt" or "/media" or "/What" directory, see you like it. When you read and write data to this directory, you are actually reading and writing data to another partition that is being mounted to the directory. Multiple partitions can only be mounted at the same time to a number of different directories, such as "/mnt/a", "/media/123" or "/home/anywhere", and any directory that is in/under may be used as the "platform" for mounting other partitions, Of course the system needs the directory not to use HA, you create your own use it.

After you hang up, the data on your hard drive can be found in a way that is similar to/path/to/anywhere, and you can't find it without a mount.

In a vulgar analogy, "/" is equivalent to C: and "/etc,/bin,/sbin,/lib" These directories are probably equivalent to c:windows and C:Program files, "/home" is equivalent to C:documents and Settings, And when you mount the second partition to "/mnt/partition2", this directory is the equivalent of D:

Mount

Mount is used to mount a file system that requires root user execution. A disk can be divided into several partitions, the file system can be created on the partition, while the mount point provides an access portal, mounts a partition's file system to a directory, calls it a mount point, and can access the contents of the file system through this mount point.

For example, a hard disk is represented as/DEV/SDA in Linux so the partition above it should be represented as/DEV/SDA1,/dev/sda2.

# Mount ### output system current mount information

# mount/dev/sda1/mnt ### sda1 Mount to/mnt

# CD/MNT ### Access content directly through/MNT

# Mount-o Remount,rw/mnt ### Mount sda1 to/mnt and set to writable

# mount-a ### Mount fstab file-configured file system

Umount

Umount with Mount instead, unload a mount point, or cancel the entry.

# umount/mnt ### Uninstall/mnt This mount point file system

# umount-a ### Uninstall all mounted file systems

Related Article

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.