应用推荐：开源磁盘分区工具 GParted
分区 GParted
![](/data/attachment/album/202001/10/220015lp58jjjt22xfppjj.jpg)



> 
> GParted 是一个可用于 Linux 发行版的非常受欢迎且免费的分区编辑器。在这里，我们简要地介绍一下它提供的功能。
> 
> 
> 


### GParted：一个自由开源的图形化分区管理器


![](/data/attachment/album/202001/10/220035waqj77qngqnk733b.png)


GParted 无疑是 [Linux 下的最好的分区管理器](https://itsfoss.com/partition-managers-linux/)之一。用户界面非常简单而可以完成任务。


在某些情况下，你最终还是会使用 [GParted](https://gparted.org/) 来修复或格式化你的 USB 驱动器。我有一个[在 Ubuntu 中使用“磁盘”应用程序不能格式化的 USB 磁盘](https://itsfoss.com/format-usb-drive-sd-card-ubuntu/)，而这是 GParted 用来救援的地方。


所以，它是一个非常有用的工具，有很多出色的功能。让我为你们重点介绍一下。



> 
> 警告！
> 
> 
> 进行磁盘分区是一件危险的工作。除非绝对必要，否则不要做。否则，你可能最终擦除了整个磁盘。
> 
> 
> 


### GParted 的功能


从简单地格式化任务到重要的分区任务，你可以使用 GParted 做很多事。我将使用一些屏幕截图突出关键功能，以帮助你在安装它前进一步了解它。


#### 创建分区表


你可以为新磁盘创建一个新的分区表，也可以擦除你现存的磁盘内容来修改分区表。


![](/data/attachment/album/202001/10/220043vf2itgigff7fgi1f.png)


你能够选择 msdos、gpt、atari，以及更多类型的分区表。


#### 创建、移动、标记、删除和修改分区表


你可以使用 GParted 中一系列选项来轻松地创建、标记、删除或修改分区表。


![](/data/attachment/album/202001/10/220046j3fi2h5ql225ix5p.png)


当然，你必须要谨慎你要做的事情。


好的是，GParted 可以确保你不能直接应用任何更改 —— 在你点击应用更改之前，它将排队你选择的操作/任务，并在你执行前最后再要求确认一次。


顶部的对号标记符号 `✓` 可以让你确认更改，然后你的更改才会生效。


这是分区可用选项的另一个屏幕截图：


![](/data/attachment/album/202001/10/220049fvvvjx4s1yftj4py.png)


#### 尝试数据救援


除了编辑分区以外，你也可以试着使用“尝试数据救援”功能以[在 Linux 中恢复丢失的数据](https://itsfoss.com/recover-deleted-files-linux/)，如下面的屏幕截图所示。


![](/data/attachment/album/202001/10/220051bnntqckdcc9nn2ke.png)


值得注意的是，默认情况下你没有安装此功能 —— 你只是能看到这个选项。因此，要使这个数据恢复功能可以正常工作，你必须使用下面的命令来单独地安装 gpart (在基于 Ubuntu/Debian 的发行版上)：



```
sudo apt install gpart
```

除了所有这些关键功能以外，它支持各种存储设备和文件系统。你可以从其官方网站的[功能列表](https://gparted.org/features.php)中了解到更多信息。


### 在 Ubuntu 和其它 Linux 发行版上安装 GParted


你可能已经预安装了 GParted 。所以，务必核实一下。如果你尚未安装它，则可以进入软件中心安装它。


如果你想使用终端，简单地键入下面的命令：



```
sudo apt install gparted
```

如上所述，如果你想要使用数据恢复选项，除了安装 gparted 软件包外，还应该安装 gpart 软件包。


如果你使用的是其它 Linux 发行版，你可以在各自的软件管理器中找到它，或者直接查看[官方下载操作说明](https://gparted.org/download.php)。


* [下载 GParted](https://gparted.org/download.php)


### 总结


当涉及处理磁盘管理和分区时，GParted 是一个非常有用且重要的工具。但是，因为显而易见的原因，当你使用它时，你必须要小心。


你尝试过 GParted 吗？你在 Linux 上使用的其它哪个分区工具？请在下面的评论中分享你的经验。




---


via: <https://itsfoss.com/gparted/>


作者：[Ankush Das](https://itsfoss.com/author/ankush/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[robsean](https://github.com/robsean) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

[GParted](https://gparted.org/?ref=itsfoss.com) is undoubtedly one of the [best partition managers for Linux](https://itsfoss.com/partition-managers-linux/) out there. The user interface is very simple and gets the job done.

In some cases, you end up using GParted to fix or [format your USB drive](https://itsfoss.com/format-usb-drive-sd-card-ubuntu/) as well. I had a USB disk which I couldn’t format in Ubuntu~~ ~~using the “Disks” app – this is where GParted came to the rescue.

So, it is a quite useful tool with plenty of good features. Let me highlight them for you.

## Installing GParted on Ubuntu and other Linux distributions

![a screenshot of gparted](https://itsfoss.com/content/images/2023/11/GParted_1.png)

Before installing GParted, let's take a look at some of its **key features**:

**Set Partition Flags****Resize/Move Partitions****Create/Remove Partitions****Ability to Set UUIDs**

So, moving on to the installation. You might have GParted pre-installed, therefore, make sure to verify that before proceeding to install it.

If you do not have it installed, you can head into the **software center** on your Linux distro and search for 'GParted' to get it installed.

In case you want to **use the terminal**, simply type in the following command (Ubuntu/Debian):

`sudo apt install gparted`


If you’re using any other Linux distribution, you can either find GParted in their respective software managers, or you could head over to the [official download page](https://gparted.org/download.php?ref=itsfoss.com) for further install instructions.

## Using the features of GParted

You can do many things with GParted, ranging from a simple format task to important partitioning tasks. I’ll highlight the key features with some screenshots to help you know more about it before installing it.

### Create partition tables

![a screenshot of gparted create partion table feature](https://itsfoss.com/content/images/2023/11/GParted_2.png)

You can create a new partition table for your disks, or erase the content of your existing disk to modify the partition table.

GParted lets you choose from different types of partition tables like *msdos*, *bsd*, *gpt*, *atari*, and more.

### Create, Move, Label, Delete & Modify Partitions

You can easily create, label, delete or modify the partitions with a bunch of options available within GParted.

Below, you can see how **creating a new partition** looks like. Of course, you will have to be careful about what you want to do.

![a screenshot of gparted create new partition feature](https://itsfoss.com/content/images/2023/11/GParted_3a.png)

After creating a new partition, you can also **Resize/Move** it according to your preference.

![a screenshot of gparted resize move partition feature](https://itsfoss.com/content/images/2023/11/GParted_3b.png)

The good thing is that **GParted makes sure that you do not directly apply any changes** – it queues up your selected operations/tasks and asks for another final confirmation before you hit it.

![a screenshot of gparted apply operations to device confirmation window](https://itsfoss.com/content/images/2023/11/GParted_4.png)

The tick mark symbol ✓ on the top allows you to confirm the changes and then only your changes take into effect.

Here’s another screenshot for the **format options** you have available for the partitions:

![a screenshot of gparted format options for partitions](https://itsfoss.com/content/images/2023/11/GParted_5.png)

### Attempt Data Rescue

Apart from editing partitions, you can also try to [recover your lost data in Linux](https://itsfoss.com/recover-deleted-files-linux/) using the “**Attempt Data Rescue**” feature, as shown in the screenshot below.

![a screenshot of gparted attempt data rescue feature](https://itsfoss.com/content/images/2023/11/GParted_6.png)

It is worth noting that **you do not have this feature installed by default** – you only see the option visible.

So, for the data recovery feature to work, you have to install '*gpart*' separately using the following command (on Ubuntu/Debian-based distributions):

`sudo apt install gpart`


In addition to all the key features listed above, **GParted supports a wide range of storage devices and file systems**. You can learn more about it from the [list of features](https://gparted.org/features.php?ref=itsfoss.com) on their official website.

**Wrapping Up**

GParted is **a very useful and important tool** when it comes to dealing with disk management and partitions. However, you will have to be careful while using it for obvious reasons.

💬 Have you tried GParted? Prefer other partitioning tools for Linux? Don't hesitate to share your experiences in the comments below!