Create ext4 filesystem

Format partition as ext4 with a label

mkfs.ext4 -L datalabel /dev/sdb1

tool
linux133 commands
tags
linuxfilesystemdisk

More linux commands

  • resize2fs /dev/sdb1

    Grow ext4 to fill the partition (after partition resize)

  • tune2fs -l /dev/sda1 | grep -E 'Block (count|size)|Mount count|Last mount'

    Show ext2/3/4 metadata: block size, mount count, last mount time

  • du -h --max-depth=2 /var | sort -rh | head -20

    Disk usage of /var up to 2 directory levels deep

  • df -hT --type=ext4 --type=xfs --type=btrfs

    Show free space only for real filesystems (skip tmpfs/overlay)

  • fdisk /dev/sdb

    Interactive MBR/GPT partition table editor

all 133 linux commands