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

Mysql example of splitting into multiple rows and columns by specific symbols

Some fault code tables use the following design p...

Installation of Docker CE on Ubuntu

This article is used to record the installation o...

The difference between KEY, PRIMARY KEY, UNIQUE KEY, and INDEX in MySQL

The problem raised in the title can be broken dow...

MySQL 5.7.23 decompression version installation tutorial with pictures and text

Download the MySQL installer Official download ad...

Why not use UTF-8 encoding in MySQL?

MySQL UTF-8 encoding MySQL has supported UTF-8 si...

Summary of some tips on MySQL index knowledge

Table of contents 1. Basic knowledge of indexing ...

How to use Vue3 asynchronous data loading component suspense

Table of contents Preface Creating Components Sum...

Mysql transaction concurrency problem solution

I encountered such a problem during development A...

The latest virtual machine VMware 14 installation tutorial

First, I will give you the VMware 14 activation c...

Detailed examples of replace and replace into in MySQL into_Mysql

MySQL replace and replace into are both frequentl...

JavaScript form validation example

HTML forms are commonly used to collect user info...

Detailed explanation of XML syntax

1. Documentation Rules 1. Case sensitive. 2. The a...

Web Design Tutorial (4): About Materials and Expressions

<br />Previous Web Design Tutorial: Web Desi...

Native JS to achieve cool paging effect

This article uses an example to share with you a ...