How to use fdisk to partition disk in Linux

How to use fdisk to partition disk in Linux

Commonly used commands for Linux partitions: fdisk, modify the MBR partition table, MBR format, the maximum size of the modified partition is 2T.

When the size is larger than 2T, use the parted command and the gpt partition format.

1. Add a new hard disk to the virtual machine

Edit virtual machine settings---Add---Hard disk---SCSI---Create a new virtual disk---1GB---Complete

2. View all disks

Disk /dev/sdb is the newly added disk

3. Start partitioning

View Help:

4. Create the first partition

5. Similarly, create 3 primary partitions and 1 extended partition

Extend the partition to allocate the default remaining space (that is, press Enter directly in the command to allocate space)

6. Create logical partitions

At this time, enter n to directly create a logical partition, and the area number starts from 5 sdb5

7. Delete unwanted partitions

Enter d and select a partition from 1-7

8. Finally save and exit

9. Execute the effective command (to prevent unknown problems)

Notify the kernel that the partition has changed

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Analysis of the Principle and Method of Implementing Linux Disk Partition
  • An article to understand Linux disks and disk partitions
  • How to implement Linux disk mounting, partitioning, and capacity expansion operations
  • Linux system disk formatting and manually adding swap partition
  • Detailed explanation of Linux virtual machine root partition disk expansion space record
  • Linux disk partitioning practical examples (must read)
  • Detailed process of LINUX disk partitioning, formatting, mounting and uninstalling
  • How to use GPT partitioning on Linux disks larger than 2T

<<:  Specific method of viewing user authorization information in mysql

>>:  Linux parted disk partition implementation steps analysis

Recommend

How to create your first React page

Table of contents What is Rract? background React...

Bootstrap 3.0 study notes buttons and drop-down menus

The previous article was a simple review of the B...

Tomcat obtains the client domain name of Nginx reverse proxy

question After Nginx reverse proxy, the Tomcat ap...

MySQL replication mechanism principle explanation

Background Replication is a complete copy of data...

CSS achieves the effect of two elements blending (sticky effect)

I remember that a few years ago, there was an int...

Understand all aspects of HTTP Headers with pictures and text

What are HTTP Headers HTTP is an abbreviation of ...

3 simple ways to achieve carousel effects with JS

This article shares 3 methods to achieve the spec...

Linux Disk Quota Management Graphical Example

Disk quota is the storage limit of a specified di...

Implementing timed page refresh or redirect based on meta

Use meta to implement timed refresh or jump of th...

Detailed explanation of TIMESTAMPDIFF case in MySQL

1. Syntax TIMESTAMPDIFF(unit,begin,end); Returns ...

CSS3 creates web animation to achieve bouncing ball effect

Basic preparation For this implementation, we nee...

Summary of four ways to introduce CSS (sharing)

1. Inline reference: used directly on the label, ...