Where to start First steps track · 15 stages
Linux Labs

mkfs — create a filesystem

cheat sheet · Ubuntu 24.04 · e2fsprogs 1.47 · xfsprogs 6.6 https://lab.dimsanych.ru/en/wiki/mkfs/

Cheat sheet

  • lsblk -f /dev/vdb what is on the disk now
  • sudo mkfs.ext4 /dev/vdb1 ext4 on a partition
  • sudo mkfs.ext4 -L data /dev/vdb1 with the label data
  • sudo mkfs -t ext4 /dev/vdb1 the same through mkfs -t
  • sudo mkfs.xfs -L logs /dev/vdb2 xfs with a label
  • sudo mkfs.ext4 -n /dev/vdb1 show parameters, create nothing
  • sudo blkid /dev/vdb1 the new filesystem's UUID for fstab

Options

Below are the options of mkfs.ext4 (that is mke2fs) and mkfs.xfs. The full lists are in man mke2fs and man mkfs.xfs.

Loading…