. Neter Linux Series three: Partition explained under Linux

Source: Internet
Author: User

One, the Linux partition

Overview: First of all, we want to make some preliminary introduction to the basic concept of hard disk partition, the partition of hard disk is mainly divided into main partition and extended partition. The sum of the primary and extended partitions cannot be more than four, and basic partitions can be used immediately, but cannot be partitioned. The extended partition must be partitioned before it can be used, that is, it must also be partitioned two times. So what's the extension partition going on? It is a logical partition, and there is no limit on the number of logical partitions.

The main green box is: Extended partition, extended partition + primary partition, no more than 4.

(2) For Windows users, there are several partitions have several drives, and each partition will have a letter identifier, and then you can choose this letter to specify the files and directories on this partition, their file structure is independent, very good understanding. But for beginners to get started with Ubuntu, it can be a bit annoying. Because for Ubuntu users, regardless of a few partitions, to which directory to use, it is ultimately only a root directory, a separate and unique file structure. Each partition in Ubuntu is used to form part of the entire file system because it uses a process called "Loading", which contains a full set of files and directories in the entire file system, and links a partition to a directory. This is a partition to load that will make its storage space available in one directory. Let's look at how Ubuntu drives are identified. As shown in the following:

Why is it? Use the following command: Fdisk-l

Visible, there are three districts. SDA1, Sda2, sda5 three partitions.

Explanation: SD: Represents a SCSI hard disk, is one of the hard disk, performance is better than the IDE hard disk, a: The first hard disk on your machine, if there are other hard drives, will show B, once and so on. 1, 2, 5 means: First partition, second partition, fifth partition.

Note: The extended partition starts at 5, so Sda5 is the extended partition, SDA1, SDA2 is the primary partition.

The rise and rise of insight:

For IDE hard drives, the drive identifier is "hdx~", where "HD" indicates the type of device on which the partition is located, which refers to the IDE hard disk. The "X" is the disk number (A is the base disk, B is the base slave, C is the secondary primary, D is the secondary slave), "~" represents the partition, the first four partitions are represented by the numbers 1 to 4, they are the primary partition or the extended partition, and the logical partition starts at 5. For example: Hda3 represents the third primary or extended partition on the first IDE hard disk, HDB2 is represented as the third primary or extended partition on the second IDE hard disk. The SCSI hard disk is identified as "sdx~", the SCSI hard disk is "SD" to indicate the type of device the partition is located in, the rest is the same as the IDE hard disk representation.

Let's take a look: The boot directory is suitable for the partition on the hard drive.

Command: df/boot/

This verifies the meaning shown in the above figure.

LS is able to see the files under boot.

If I break this line between boot and partition, will you still see the following file?

Command: Switch to the root directory, execute: umount/boot/and then the LS you will find that the files are not visible.

This explains: The file management mechanism in Linux is to use the contents of the partition through the mechanism of mount and unload.

Think: Can you attach a partition to a directory?

The answer is yes.

Do the following:

If you don't want to use it, you can uninstall:

Well, go back and experience the first paragraph:

for Windows users, there are several partitions with several drives, and each partition obtains a letter identifier, which can then be used to specify the files and directories on this partition, their file structure is independent, very good understanding. But for beginners to get started with Ubuntu, it can be a bit annoying. Because for Ubuntu users, regardless of a few partitions, to which directory to use, it is ultimately only a root directory, a separate and unique file structure. Each partition in Ubuntu is used to form part of the entire file system because it uses a process called "Loading", which contains a full set of files and directories in the entire file system, and links a partition to a directory. This is a partition to load that will make its storage space available in one directory. Let's look at how Ubuntu drives are identified.

Supplemental command: Several important commands in the Linux partition

And this command find-size +1000000k can help you.

Guo Yan

Source: http://www.cnblogs.com/runningsmallguo/

The copyright of this article is owned by the author and the blog Park, welcome reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to give the original link.

. Neter Linux Series three: Partition explained under Linux

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.