How do you format an external hard drive to ext4 via the command line in ubuntu?
Asked
Active
Viewed 1.2e+01k times
1 Answers
45
The command is mkfs.ext4
, see its man page.
If you are ok with the default settings(1), it's just
mkfs.ext4 /dev/yourpartitionhere
Footnotes:
(1) from the man page:
The defaults of the parameters for the newly created filesystem, if not overridden by the options listed below, are controlled by the /etc/mke2fs.conf configuration file. See the mke2fs.conf(5) manual page for more details.

Rmano
- 31,947
sudo fdisk -l
. Thanks – ss_millionaire Nov 13 '14 at 08:22