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

What are the differences between linux df and fdisk

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

Share

Shulou(Shulou.com)05/31 Report--

Most people do not understand the knowledge points of this article "what are the differences between linux df and fdisk", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what are the differences between linux df and fdisk" article.

Differences: 1, fdisk can output partition contents, can also delete or add partitions, while df can only output partition usage; 2, fdisk bias operational, and df is the view browsing command; 3, view the project, fdisk view the content focuses on the partition table information, while df focuses on displaying the current system of all file system information.

The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

The difference between linux df and fdisk:

Fdisk is a partitioning tool that outputs all partitions of a device, or deletes or adds partitions; df is used to view the usage of file systems (partitions).

Fdisk is a command that tends to be operational, and df is to view and browse

Fdisk also has a view project, which focuses on information about partition tables and also serves disk partitions, while df focuses on displaying information about all file systems in the current system

1. Df lists the overall disk usage of the file system

Because almost all the data read by df is for an entire file system, so the scope of reading is mainly information in Superblock, so this command displays the results very quickly!

Supplement: easy-to-read capacity formats, such as K, M, G

2. Fdisk: output all partition contents and operation partitions of the device (delete, add)

1) all partition contents of the fdisk output device

No matter what you do, as long as you press "Q" when you leave fdisk, then all actions "will not take effect!" On the contrary, pressing "w" means that the action takes effect.

Fdisk-l view all partitions

Add: its printing effect is the same as fdisk / dev/sda

2) Operation Partition (delete, add)

The following is a demonstration of the partition, with screenshots only and no actual operation.

2.1) Delete the partition:

2.2) New Partition:

2.3) New extended Partition

The above is about the content of this article on "what are the differences between linux df and fdisk". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

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