Home  >  Article  >  Operation and Maintenance  >  What is the command to create a disk partition in linux

What is the command to create a disk partition in linux

王林
王林Original
2020-06-22 13:36:4211199browse

The command to create a disk partition in Linux is fdisk. The specific method is: 1. Enter root and check the partition status of all disks; 2. Execute the command [fdisk /dev/sdc] to partition the sdc disk; 3. Enter n and p in order to create the primary partition.

What is the command to create a disk partition in linux

The command to create a disk partition in Linux is:

fdisk 磁盘

(Recommended tutorial: linux tutorial)

Method for disk partitioning:

1. Enter root;

2. Enter (this command will display all disks that are not partitioned)

fdisk -l

What is the command to create a disk partition in linux

3. To partition the sdb, enter the command:

fdisk /dev/sdc

to partition the sdc disk, then enter m to view the help, and finally enter p to view the partitions of the disk. Condition.

What is the command to create a disk partition in linux

4. Enter n to create a new partition, as shown in the figure:

What is the command to create a disk partition in linux

5. According to the prompt in the picture above, enter p to create a primary partition. You will be prompted to create the ID number of the primary partition. A maximum of 4 primary partitions can be created on a disk.

What is the command to create a disk partition in linux

6. Enter 1 according to the prompts. It will help you create a partition directory of /dev/sdc1. At this time, you will be prompted for the starting and ending positions of the partition. The first cylinder represents the starting position, and the last cylinder represents the ending position

What is the command to create a disk partition in linux

7. Finally, you can enter p to view The situation of the partition just now:

What is the command to create a disk partition in linux

#8. Enter w to save the changes and exit.

The above is the detailed content of What is the command to create a disk partition in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Related articles

See more