mkfs

Build a Linux filesystem on a hard disk partition. This command is deprecated in favor of filesystem specific mkfs.<type> utils. More information: <https://manned.org/mkfs>.

Install

All systems
curl cmd.cat/mkfs.sh
Debian Debian
apt-get install util-linux
Ubuntu
apt-get install util-linux
Alpine
apk add util-linux
Arch Arch Linux
pacman -S util-linux
image/svg+xml Kali Linux
apt-get install util-linux
CentOS
yum install util-linux
Fedora
dnf install util-linux
Windows (WSL2)
sudo apt-get update sudo apt-get install util-linux
OS X
brew install util-linux
Raspbian
apt-get install util-linux
Docker
docker run cmd.cat/mkfs mkfs powered by Commando

Build a Linux filesystem on a hard disk partition. This command is deprecated in favor of filesystem specific mkfs.<type> utils. More information: <https://manned.org/mkfs>.

  • Build a Linux ext2 filesystem on a partition:
    mkfs path/to/partition
  • Build a filesystem of a specified type:
    mkfs -t ext4 path/to/partition
  • Build a filesystem of a specified type and check for bad blocks:
    mkfs -c -t ntfs path/to/partition

© tl;dr; authors and contributors