Linux hard disk partition, partition, delete partition, format, mount, uninstall note

Source: Internet
Author: User

Although Linux has always been playing, but the hard disk operation is not very familiar with today's free, just finishing the next.

1, create a partition

Check to see if there are no partitions on the disk

[HTML]View Plaincopy
    1. Fdisk-l


The first box and the second box are the disks that have been partitioned, and the third hard disk has no partitions.

Start partition

[HTML]View Plaincopy
    1. Fdisk/dev/sdc


Enter m to see what actions are available

Enter P to view the current hard disk partition, no partitions currently available.

Enter N to create a new partition, enter p to create a partition, enter the partition number 1


Then let you set the start sector (not sure if this is the explanation): The default carriage return is 1 from the beginning

Then end sector Settings 1000 This value seems to determine the size of the partition, I am not very familiar with the hardware. Install the method above to create a second partition

Then print the number of partitions input p, the red box is the established partition

Last Save partition Input W


Finally, check to see if the partition has been established! If a red area appears, it is already established.


In fact, this time, the establishment of a good partition can not be used, but also need to mount to use. But before it is mounted, it must be formatted before it can be done ...

2, Format partition

Format command: MKFS.EXT3/DEV/SDB1 is formatted into ext3

MKFS.EXT2/DEV/SDB1 is formatted into ext2

I used the mkfs.ext3 here.

[HTML]View Plaincopy
    1. Mkfs.ext3/dev/sdc1
    2. Mkfs.ext3/dev/sdc2


Here is one of the graphs:

It is not available after formatting and must be mounted.

3, Mount Partition

After formatting, you can mount the partition.

[HTML]View Plaincopy
  1. Mkdir/d1
  2. Mount/dev/sdc2/d2

This will be mounted successfully and can be used normally.


4, unmount the partition

[HTML]View Plaincopy
    1. Umount/dev/sdc2

Uninstalled, actually can be mounted, and the data will be in the

5, delete partition [HTML]View Plaincopy
  1. Fdisk/dev/sdc
  2. D

Input W save, this time partition and deleted, can be recreated.

Original: http://blog.csdn.net/pi9nc/article/details/21740319

Linux hard disk partition, partition, delete partition, format, mount, uninstall note

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.