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

The method of realizing disk Partition in linux system

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Today, I will talk to you about the method of realizing disk partitioning in linux system. Many people may not know much about it. In order to let everyone know more, Xiaobian summarizes the following contents for everyone. I hope everyone can gain something according to this article.

Linux is a free-to-use and freely distributed UNIX-like operating system, is a POSIX-based multi-user, multitasking, multi-threaded and multi-CPU operating system, using Linux to run major Unix tools, applications and network protocols.

Let me start with a few simple commands:

free View current system memory usage

View partition usage: T type, H display size in G, M

View partition information of all hard disks in the system: partitions without partitions are displayed

Start partition: why add cu can also not add oh, virtual machine to do experiments, cu for virtual hard disk, virtual hard disk no cylinder

(m for help) Press m for help

Parameters do not have to know so much, only know 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 main partitions or 3 main partitions, an extended partition, N logical partitions (N represents how many I haven't studied, there are 14 in previous books, there are 12, there are countless, who knows, you can leave a message to me to share)

Of course, it's all about the main points. You can start from 1 or you can start from 2, which is a little awkward. The default starts at 2048K, but it can start at 3000K, which is a bit wasteful.

Start with 2 and ignore 1.

Extended partition: Extended partition usually absorbs all of the remaining parts of the main partition:

Logical partitions usually start at 5 by default, 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), refresh partition table. Do not refresh is not able to see the newly added partition, still can not be used. You can see/proc partition information partprobe strength is not as strong as partx -d strength, but you can also use

Partition formatting: select the type of format you want to use

Use of extended partitions:

Format a swap partition:

First check the swap partition information in the current system:

Add a swap partition: also can see, sda2 priority is greater than sdb5, the larger the number, the higher the priority

Close a swap partition:

After reading this, do you know more about how to implement disk partitioning on linux systems? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.

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