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 Partition Command

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

Share

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

This article mainly introduces "the use of linux partition command)". In daily operation, I believe many people have doubts about the use of linux partition command). The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "the use of linux partition command)." Next, please follow the editor to study!

Let's start with a few simple commands:

Free to view the usage of current system memory

View the use of partitions: t type, H display size to GMagne M.

Check the partition information of all the hard drives in the system: the partitioned ones without partitions are displayed.

Start partitioning: why add cu or not, add virtual machine to do experiment, cu for virtual hard disk, virtual hard disk has no cylinder.

(m for help) Press m key for help

It is impossible to know so many parameters, only a few commonly used iok: d delete partition, l view partition type, n add partition, p print partition table, Q exit do not save, t modify partition type, w save

A hard disk can create up to 4 primary partitions or 3 primary partitions, one extended partition, and N logical partitions (N represents how many I haven't studied. I've read 14 before, 12, and countless others. Who knows you can leave me a message to share)

Of course, it's all the Lord's priority, and you can start from 1 to 2, but don't look twisted. The default is 2048K, or you can start at 3000K, but it's a bit wasteful.

Start with 2 and ignore 1.

Sub-extended partition: the extended partition usually absorbs all the main points to distinguish the rest:

Logical partitions usually start at 5 by default, with 4 primary partitions, right? it can only start at 5.

Modify partition type: t modify partition type, modify sdb5, 8e represents lvm logical volume, L can view partition type, you can choose at will.

Save exit (wq) and refresh the partition table. If you don't refresh, you can't see the newly added partition, and you still can't use it. You can see / proc partition information partprobe is not as powerful as partx-d, but it can also be used

Partition formatting: after you select the type to format, you can use it.

Use of extended partitions:

Format a swap partition:

First check the swap partition information on the current system:

Add a swap partition: at the same time, you can also see that sda2 has a higher priority than sdb5. The higher the number, the higher the priority.

Close a swap partition:

Do not want this swap partition, swap partition has been closed, formatted or deleted directly from the partition.

At this point, the study on "how to use the linux partition command)" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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