1024programmer Linux Which command is used to format the partition in the linux system – linux operation and maintenance

Which command is used to format the partition in the linux system – linux operation and maintenance

Which command does the Linux system use to format partitions?

Linux system format partition with fdisk command.

Linux fdisk is a program to create and maintain a partition table, which is compatible with DOS type partition table, BSD or SUN type disk list.

Syntax

fdisk [required parameter][option parameter]

required Parameters:

-l lists all partition tables

-u is used with “-l” to display the number of partitions

selection parameters:

-s specified 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 new partition

p: display partition information

q: exit without saving

t: set partition number

v: perform partition check

w: Save modification

x: Extend application, advanced function

Instance

Display the current partition status:

# 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

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

Related tutorial recommendation:

Linux video tutorial, learning address: #course/ list/33.html

The above is the detailed content of which command is used in the Linux system to format the partition. For more information, please pay attention to other related articles on 1024programmer.com!

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/which-command-is-used-to-format-the-partition-in-the-linux-system-linux-operation-and-maintenance/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索