Linux disk and file system management 2-Use fdisk for disk management

Source: Internet
Author: User

1 fdisk partitioning Tool

1Fsidk is a partition tool from IBM that supports the vast majority of operating systems. Almost all Linux systems are equipped with fdisk

2 fdisk is a partition tool that supports MBR. If you want to use GPT, you cannot use fdisk for partitioning.

3. fidsk can be used only commands with super users, such as Su or sudo.

4. Use fdisk-L to list all the installed disks and their partition information. I have inserted a USB flash disk for testing, that is, sdb4 in the figure.


5 Use fdisk/dev/SD [~ Z] can partition the target directory. Below I will use the inserted USB flash drive, that is, sdb4, As a demonstration

1. We can view all the commands through M.

2. Print all partition tables through P. The error message "no" is displayed.


3. Run the command n to add partitions, prompting you to add primary partitions and extended partitions.ArticleI mentioned

The MBR partitioning mechanism has a maximum of four primary partitions.


4. Create a primary partition.


5. Create an extended partition but the extension is not available. The extended partition must be further divided into logical partitions.

6. Create a logical partition. The number of the logical partition will always start from 5.

7. After the partition ends, we must use the W command to write the partition table so that the disk can be truly written.


6. After partitioning, we need to use the partprobe command to let the kernel update the partition information. Otherwise, we need to restart to display the partition details.







 

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.