Which command is used to format partition in linux system

藏色散人
Release: 2020-03-10 13:13:02
Original
5854 people have browsed it

Which command is used to format partition in linux system

Which command is used to format a partition in Linux system?

Use the fdisk command to format partitions in Linux systems.

Linux fdisk is a program that creates and maintains partition tables. It is compatible with DOS-type partition tables, BSD or SUN-type disk lists.

Syntax

fdisk [必要参数][选择参数]
Copy after login

Required parameters:

-l List all partition tables

-u and "-l" Used together, display the number of partitions

Select parameters:

-s Specify partition

-v Version information

Menu operation instructions

m: Display menu and help information

a: Active partition mark/boot partition

d: Delete partition

l: Display partition type

n: Create a new partition

p: Display partition information

q: Exit without saving

t: Set the partition number

v: Perform partitioning Check

w: Save modifications

x: Extended application, advanced functions

Instance

Display the current partition situation:

# fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
  Device Boot   Start     End   Blocks  Id System
/dev/sda1  *      1     13   104391  83 Linux
/dev/sda2       14    1305  10377990  8e Linux LVM
Disk /dev/sdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
Copy after login

Display Each partition of the SCSI hard disk

# fdisk -lu  
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
  Device Boot   Start     End   Blocks  Id System
/dev/sda1  *     63   208844   104391  83 Linux
/dev/sda2     208845  20964824  10377990  8e Linux LVM
Disk /dev/sdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders, total 10485760 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk /dev/sdb doesn't contain a valid partition table
Copy after login

Recommended related tutorials:

Linux video tutorial, learning address: https://www.php.cn/ course/list/33.html

The above is the detailed content of Which command is used to format partition in linux system. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template