Filesystems: Difference between revisions

From Alpine Linux
(added fileystem label table)
m (added clarification on umounted nature)
 
Line 40: Line 40:


Most of the commonly used filesystems store the '''volume label''' or '''filesystem label''' in their metadata/superblock.  
Most of the commonly used filesystems store the '''volume label''' or '''filesystem label''' in their metadata/superblock.  
Labels can be set during filesystem creation or at a later time. The below table lists the commands for both. The commands are non-destructive as long as the filesystem is '''Unmounted''' except for btrfs.


{| class="wikitable" align="center" style="width:100%; border:1px #0771a6 solid; background:#f9f9f9; text-align:left; border-collapse:collapse;"
{| class="wikitable" align="center" style="width:100%; border:1px #0771a6 solid; background:#f9f9f9; text-align:left; border-collapse:collapse;"

Latest revision as of 11:39, 2 September 2025

This page documents the Alpine Linux supported filesystems needed for various storage media.

Overview

The following table lists the packages related to various filesystems available in Alpine Linux along with the command to format.

Tool Filesystem Formatting command Brief Notes
btrfs-progs Btrfs mkfs.btrfs combines copy-on-write and volume management
dosfstools FAT12/FAT16/FAT32 mkfs.vfat also used for EFI partition
e2fsprogs ext2/ext3/ext4 mkfs.ext4 ext4 is current default in Linux
exfatprogs exfat mkfs.exfat Commonly used on USB flash drives and SD cards
f2fs-tools F2FS mkfs.f2fs
hfsprogs HFS/HFS+ mkfs.hfsplus Apple/Mac products
jfsutils JFS mkfs.jfs
ntfs-3g-progs NTFS mkfs.ntfs Full-featured, Microsoft/Windows FUSE driver
squashfs-tools SquashFS mksquashfs compressed read-only file system
xfsprogs XFS mkfs.xfs

Filesystem tools

Different packages/programs are used to format different types of filesystems. The filesystem tools and the formatting commands are listed above.

Filesystem labels

Most of the commonly used filesystems store the volume label or filesystem label in their metadata/superblock.

Labels can be set during filesystem creation or at a later time. The below table lists the commands for both. The commands are non-destructive as long as the filesystem is Unmounted except for btrfs.

Filesystem Tool Filesystem creation Existing filesystem Mounted/Unmounted
Btrfs btrfs-progs mkfs.btrfs -L "label" /dev/sdXY btrfs filesystem label /mount/point "newlabel" Mounted
FAT32 dosfstools mkfs.fat -n "LABEL" /dev/sdXY fatlabel /dev/sdXY "NEWLABEL" Unmounted
ext4 e2fsprogs-extra mkfs.ext4 -L "label" /dev/sdXY tune2fs -L "newlabel" /dev/sdXY Unmounted
NTFS ntfs-3g-progs mkfs.ntfs -L "label" /dev/sdXY ntfslabel /dev/sdXY "newlabel" Unmounted
XFS xfsprogs mkfs.xfs -L "label" /dev/sdXY xfs_admin -L "newlabel" /dev/sdXY Unmounted

See also