Windows format equivalent in Linux
Creates a new filesystem on a disk partition, erasing all existing data.
format
mkfs.ext4
mkfs.ext4
mkfs.ext4
Overview
What this command does
On Windows, "format" is used to format a disk/partition. On Linux, the closest practical mapping shown here is "mkfs.ext4". Creates a new filesystem on a disk partition, erasing all existing data. This reference is grouped under System & Storage → Disk & Storage.
Windows → Linux context
What changes when you use this on Linux?
Equivalent task, different tool
Windows format maps to mkfs.ext4 for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.
Portable across the compared distros
The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.
Command-specific caution
Double-check the device path (/dev/sdb1, etc.) before formatting. Formatting the wrong drive permanently destroys its data.
For the broader concept behind this mapping, read Linux disks, storage and mounts.
Practical tasks
Common use cases
Format a disk/partition
Creates a new filesystem on a disk partition, erasing all existing data.
mkfs.ext4
Format as ext4 (standard Linux)
mkfs.vfat
Format as FAT32 (Windows compatible)
mkfs.exfat
Format as exFAT (cross-platform, large files)
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
lsblk
mkfs.ext4 /dev/sdb1
mkfs.vfat -F 32 /dev/sdb1
Walkthrough
Examples with explanations
# Windows: format D: /fs:NTFS /q
# First identify your drive safely:
lsblk # list all drives and partitions
# Format (REPLACES ALL DATA on that device!):
mkfs.ext4 /dev/sdb1 # Linux-native format
mkfs.vfat -F 32 /dev/sdb1 # FAT32 for USB sticks
Reference
Common options and variations
| Command or option | Use |
|---|---|
mkfs.ext4 | Format as ext4 (standard Linux) |
mkfs.vfat | Format as FAT32 (Windows compatible) |
mkfs.exfat | Format as exFAT (cross-platform, large files) |
mkfs.ntfs | Format as NTFS (Windows compatible) |
lsblk | List all drives first to find the right one |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
Debian/Ubuntu, Fedora and Arch all use "mkfs.ext4" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | mkfs.ext4 |
Same command on this distribution. |
| Fedora | same command | mkfs.ext4 |
Same command on this distribution. |
| Arch | same command | mkfs.ext4 |
Same command on this distribution. |
Important
What to watch out for
Keep learning