![]() Use the w option to write the changes to the disk: Command (? for help): w Hex code or GUID (L to show codes, Enter = 8300): ![]() Select all the default options to create a partition using the whole disk: First sector (34-11721045134, default = 2048) or : THIS WILL OVERWRITE EXISTING PARTITIONS!!Ĭreate a new partition using the n option and selecting partition number 1: Command (? for help): n Use the d option to delete the partitions: Command (? for help): dįinal checks complete. It is good practice to do this on new drives too, just to verify it is a clean drive: sudo gdisk /dev/sdaįound valid GPT with protective MBR using GPT. ![]() If this is a used drive, you’ll want to delete all existing partitions. In the following commands, replace /dev/sda with the disk identifier of your drive! To get the disk identifier, run: sudo fdisk -l How to Partition, Format, and Mount a Disk on Ubuntu 20.04 Using Command LineĪfter attaching your disk to the machine, you’ll want to get a list of the disks and find the disk identifier (i.e. For the purposes of this article, we’ll be formatting the disk using the EXT4 filesystem. You can use a new disk or a used disk that you’re wanting to erase. Using the Ubuntu GUI is straightforward, but if you’re running a Linux server, you’ll need to do this process using the command line. If you run an Ubuntu 20.04 server, or even a workstation, at some point you’ll probably need to connect an external drive and partition it, format it, and mount it.
0 Comments
Leave a Reply. |