如何在 Linux 上将 USB 盘格式化为 exFAT
exFAT USB

> 
> 本教程教你如何在 Linux 系统上以 exFAT 格式格式化 USB 盘。同时包括 GUI 和命令行两种方法。
> 
> 
> 


长期以来，[FAT](https://en.wikipedia.org/wiki/File_Allocation_Table) 是用于格式化磁盘文件系统的默认选择。它与几乎所有主要操作系统兼容。


FAT 文件系统的一个主要问题是你不能传输大于 4GB 的文件。这意味着即使你的 USB 盘有 32GB 的可用空间，如果你尝试传输 ISO 镜像或其他大于 4GB 的文件，传输也会失败。


这会[在 Linux 中创建 Windows 的可启动 USB 盘](https://itsfoss.com/bootable-windows-usb-linux/)的情况下造成问题。你不能使用 [NTFS](https://en.wikipedia.org/wiki/NTFS)，并且 FAT 文件系统有 4GB 的大小限制。


为了克服 FAT 文件系统的限制，微软推出了 [exFAT 文件系统](https://en.wikipedia.org/wiki/ExFAT)。在本教程中，我将向你展示如何使用 exFAT 文件系统中格式化 USB 盘。


### 先决条件


从 [Linux kernel 5.4](https://itsfoss.com/linux-kernel-5-4/) 开始，Linux 内核本身中启用了 exFAT 文件系统支持。[检查正在运行的 Linux 内核版本](https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/)。如果是内核 5.4 或更高版本，那么应该没问题。


不然，你必须[启用 exFAT 支持](https://itsfoss.com/mount-exfat/)。在基于 Ubuntu 的发行版中，你可以安装以下软件包：



```
sudo apt install exfat-fuse exfat-utils
```

### 方法 1：使用 GNOME 磁盘工具将磁盘格式化为 exFAT


![](/data/attachment/album/202006/08/103337i686zyf1fjkbt4fy.jpg)


使用 “[GNOME 磁盘](https://wiki.gnome.org/Apps/Disks)” 格式化驱动器是一项简单的工作。它预装在许多 Linux 发行版中。


插入外部 USB 盘。在菜单中查找 “Disk”，然后打开 “GNOME 磁盘” 应用。第一步，选择要格式化的驱动器，然后按照我的步骤操作。


**警告：请注意你要选择格式化的磁盘。请勿意外格式化主磁盘。**


![](/data/attachment/album/202006/08/103355tcndntzu5lcnyddy.png)


诸如 Ext4、NTFS、FAT 之类的常用文件系统将首先出现。要使用 exFAT，请选择 “其它”，然后单击 “下一步”。


![](/data/attachment/album/202006/08/103414sqrsa9ydda2zzd77.jpg)


最后一步：在此页面上选择 exFAT 文件系统，然后单击 “创建”。完成了！


![](/data/attachment/album/202006/08/103439wj12hts1zh1h7vrp.jpg)


看到在 Linux 中以图形方式创建 exFAT 磁盘有多么容易了吧？现在，让我向你展示终端方法。


### 方法 2：在 Linux 命令行中将磁盘格式化为 exFAT（适用于高级用户）


[fdisk](https://www.tldp.org/HOWTO/Partition/fdisk_partitioning.html) 是一个交互式命令行程序，它可在硬盘上创建和操作分区表和分区。实际上，它被认为是 [Linux 最佳分区工具](https://itsfoss.com/partition-managers-linux/)之一。


插入外部硬盘，然后在终端中输入以下命令：



```
sudo fdisk -l
```

![](/data/attachment/album/202006/08/103456mdpmmpx1kp2bmf9l.jpg)


这将列出计算机中的所有硬盘和分区。识别出要在外部硬盘上格式化的分区。应该会提示磁盘大小。对我而言，USB 盘被标记为 `/dev/sdb1`。


识别出 USB 盘后，请使用以下命令将它格式化为 exfat。将 `/dev/sdXn` 替换为你的磁盘 ID。`LABEL` 是你要为磁盘命名的名称，例如 `Data`、`MyUSB` 等。



```
sudo mkfs.exfat -n LABEL /dev/sdXn
```

![](/data/attachment/album/202006/08/103521cu6r96hhzzuhm6mu.jpg)


可选地，运行 `fsck` 检查，以确保格式化正确。



```
sudo fsck.exfat /dev/sdXn
```

就是这样。享受 exFAT 盘吧。


### 你是否成功创建了exFAT 盘？


我希望你觉得本教程足够简单，并建立坚实的分区知识基础的第一步。


从长远来看，有时简单易用的技巧将让你拥有一个更好的 Linux。




---


via: <https://itsfoss.com/format-exfat-linux/>


作者：[Dimitrios Savvopoulos](https://itsfoss.com/author/dimitrios/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[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)

For a long time, [FAT](https://en.wikipedia.org/wiki/File_Allocation_Table?ref=itsfoss.com) has been the default choice of filesystem for formatting disks. It is compatible with pretty much all the major operating systems.

The one major problem with the FAT filesystem is that you cannot transfer a file larger than 4 GB. This means even if your USB disk has 32 GB of free space, if you try to transfer an ISO image or some other file greater than 4 GB in size, the transfer will fail.

This creates a problem in situations like when you are [creating a bootable USB of Windows in Linux](https://itsfoss.com/bootable-windows-usb-linux/). You cannot use [NTFS](https://en.wikipedia.org/wiki/NTFS?ref=itsfoss.com) and FAT filesystem has that 4 GB size restrictions.

To overcome the limitations of FAT filesystem, Microsoft came up with [exFAT filesystem](https://en.wikipedia.org/wiki/ExFAT?ref=itsfoss.com). In this tutorial, I’ll show you how to format a USB disk in exFAT filesystem.

## Prerequisites

Starting [Linux kernel 5.4](https://itsfoss.com/linux-kernel-5-4/), exFAT filesystem support is enabled in the Linux kernel itself. [Check which Linux kernel version you are running](https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/). If it is kernel 5.4 or higher, you should be fine (mostly).

Otherwise, you can [enable exFAT support](https://itsfoss.com/mount-exfat/) explicitly.

In Ubuntu 20.04 and lower versions, you can use the following command:

`sudo apt install exfat-fuse exfat-utils`


For Ubuntu 22.04 and higher, you should use this command instead:

`sudo apt install exfat-fuse exfatprogs`


## Method 1: Format disk as exFAT using GNOME Disks tool

Formatting a drive using [GNOME Disks](https://wiki.gnome.org/Apps/Disks?ref=itsfoss.com) is a straightforward job. It comes preinstalled in a number of Linux distributions.

Plug in your external USB disk. Now, look for Disks in menu and open the GNOME Disks application. As a first step choose the drive that you want to format and follow the steps with me.

**Pay attention to the disk you are selecting to format. Don’t format your main disk accidentally.**

![GNOME disks for formatting disks in Linux](https://itsfoss.com/content/images/wordpress/2020/05/1.-gnome-disks-2.png)

The commonly used file systems like Ext4, NTFS, FAT will appear first. To use exFAT, choose “**Other**” and then click on “**Next**“.

![Formatting disk as ExFAT disks in Linux](https://itsfoss.com/content/images/wordpress/2020/05/2.-gnome-disks.jpg)

Final step: choose exFAT file system on this screen and then click **Create**. Job done!

![Formatting disk as ExFAT disks in Linux](https://itsfoss.com/content/images/wordpress/2020/05/3.-gnome-disks.jpg)

See how easy it was to create a exFAT disk in Linux graphically? Now, let me show you the terminal method as well.

## Method 2: Format disk as exFAT in Linux command line (for advanced users)

[fdisk](https://www.tldp.org/HOWTO/Partition/fdisk_partitioning.html?ref=itsfoss.com) is a dialogue-driven command-line utility that creates and manipulates partition tables and partitions on a hard disk. In fact, it is considered one of the [best partitioning tools for Linux](https://itsfoss.com/partition-managers-linux/).

Plug in your external hard disk then type the following command in the terminal:

`sudo fdisk -l`


![using fidks to list disks](https://itsfoss.com/content/images/wordpress/2020/05/sudo-fdisk-l-1.jpg)

This will list down all the hard disks and partitions in your computer. Identify the partition that you want to format in your external hard disk. Size of the disks should give you a hint. For me, the USB disk was labelled as /dev/sdb1.

Once you have identified your USB disk, format it as exfat using the command below. Replace /dev/sdXn with your disk’s device ID. LABEL is basically the name you want to give to your disk like Data, MyUSB etc.

`sudo mkfs.exfat -n LABEL /dev/sdXn`


![Use fdisk to format USB as exfat in Linux command line](https://itsfoss.com/content/images/wordpress/2020/05/sdXn.jpg)

Optionally, [run fsck check](https://linuxhandbook.com/fsck-command/?ref=itsfoss.com) to make sure the formatting has been done properly.

`sudo fsck.exfat /dev/sdXn`


That’s it. Enjoy the exFAT disk.

## Did you succeed in creating exFAT disk?

I hope you find this tutorial simple enough and a step forward to build a solid partitioning knowledge foundation.

Sometimes, easy and simple tips and tricks will make you a better Linux in the long term. Our frequent readers know that first hand but if you discovered It’s FOSS recently, you may take the opportunity to explore our handy tutorials.

Don’t forget to subscribe and let me know your questions and suggestions in the comments below.