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

How to use linux disk Partition tool cfdisk

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces how to use linux disk partitioning tool cfdisk. It is very detailed and has certain reference value. Friends who are interested must finish reading it.

Cfdisk is a program for disk partitioning, which is very similar to DOS's fdisk, with an interactive interface rather than the traditional fdisk question-and-answer interface, you can easily use the arrow keys to control the partition operation.

When we add a new disk or expand the capacity of the original disk, we will use the disk partitioning tool, which is very important for the management of the whole system.

1. Add a hard disk with the capacity of 2GB, do not repeat the steps, and operate according to your own situation. Using the lsblk command to check the current storage device, we can see that our new device name is sdb.

LsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 10G 0 disk ├─ sda1 8:1 0 250M 0 part / boot └─ sda2 8:2 0 9.8G 0 part ├─ CentOS-root 253:0 0 8.3G 0 lvm / └─ centos-swap 253:1 0 1.5G 0 lvm [SWAP] sdb 8:16 0 2G 0 disksr0 11:0 1 1024M 0 rom

2. Use cfdisk to partition the device sdb.

Cfdisk / dev/sdb1

After entering the above command, the following interface appears on the screen:

The use of disk Partition tool cfdisk under Linux the use of disk Partition tool cfdisk under Linux

The cursor defaults to "New" and press enter. Follow the steps below (enter key to confirm each step): primary partition (logical partition)-> size (MB, where you need to enter the size of the new partition, press enter after typing)-> type (select according to actual needs)-> write (enter "Yes" after enter).

After the above steps are completed, the following figure is shown:

The use of disk Partition tool cfdisk under Linux the use of disk Partition tool cfdisk under Linux

Use lsblk again to take a look:

LsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 10G 0 disk ├─ sda1 8:1 0 250M 0 part / boot └─ sda2 8:2 0 9.8G 0 part ├─ centos-root 253:0 0 8.3G 0 lvm / └─ centos-swap 253:1 0 1.5G 0 lvm [SWAP] sdb 8:16 0 2G 0 disk └─ sdb1 8:17 0 2G 0 partsr0 11:0 1 1024M 0 rom

3. Just format the mount or perform LVM operation according to the actual situation.

The above is all the contents of the article "how to use linux disk Partition tool cfdisk". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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

Development

Wechat

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

12
Report