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

Let’s talk in detail about how browsers view closures

Table of contents Preface Introduction to Closure...

Simple web page code used in NetEase blog

How to use the code in NetEase Blog: First log in...

Specific use of CSS content attribute

The content attribute is generally used in the ::...

Solution to changing the data storage location of the database in MySQL 5.7

As the data stored in the MySQL database graduall...

CentOS6.8 Chinese/English environment switching tutorial diagram

1. Introduction People who are not used to Englis...

CentOS 8 is now available

CentOS 8 is now available! CentOS 8 and RedHat En...

Docker learning method steps to build ActiveMQ message service

Preface ActiveMQ is the most popular and powerful...

Skin change solution based on Vue combined with ElementUI

Table of contents Written in front Solution 1: Us...

Learn the key knowledge that must be mastered in the Vue framework

1. What is Vue Vue is a progressive framework for...

Tomcat+Mysql high concurrency configuration optimization explanation

1.Tomcat Optimization Configuration (1) Change To...

Docker meets Intellij IDEA, Java development improves productivity tenfold

Table of contents 1. Preparation before developme...

Vue implements online preview of PDF files (using pdf.js/iframe/embed)

Preface I am currently working on a high-quality ...

Tutorial on using Docker Compose to build Confluence

This article uses the "Attribution 4.0 Inter...

Detailed explanation of three relationship examples of MySQL foreign keys

This article uses examples to describe the three ...