Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the command for the linux system to format the partition

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces what is the command for formatting partitions in the linux system, and focuses on its specific steps. This article is compact. I hope you can get something.

What is the command for the linux system to format partitions?

The fdisk command is used to format partitions in the linux system.

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

Grammar

Fdisk [necessary parameters] [Select parameters]

Required parameters:

-l list all partition tables

-u is used with "- l" to show the number of partitions

Select parameters:

-s specify partition

-v version information

Menu operation instructions

M: display menus and help information

A: active partition mark / boot partition

D: delete partition

L: displays the partition type

N: create a new partition

P: display partition information

Q: exit without saving

T: set the partition number

V: perform a partition check

W: save changes

X: extended applications, advanced features

Example

Displays the current partition:

# fdisk-lDisk / dev/sda: 10.7 GB, 10737418240 bytes255 heads, 63 sectors/track, 1305 cylindersUnits = 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 LVMDisk / dev/sdb: 5368 MB, 5368709120 bytes255 heads, 63 sectors/track, 652 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk / dev/sdb doesn't contain a valid partition table

Displays each partition of the SCSI hard drive

# fdisk-lu Disk / dev/sda: 10.7 GB, 10737418240 bytes255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectorsUnits = 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 LVMDisk / dev/sdb: 5368 MB, 5368709120 bytes255 heads, 63 sectors/track, 652 cylinders, total 10485760 sectorsUnits = sectors of 1 * 512 = 512bytesDisk / dev/sdb doesn't contain a valid partition table

These are the details of what is the command for formatting the partition in the linux system, and do you get anything after reading it? If you want to know more about it, welcome to the industry information!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report