📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials Linux Command Line Disk Partitions

Disk Partitions

5 min read
List block devices with lsblk. Partition with fdisk, format with mkfs.ext4, and mount with mount /dev/sdb1 /mnt/data. Add an entry to /etc/fstab using the disk UUID for automatic mounting at every boot.

Disk Partitions and Mount

lsblk           # list block devices
fdisk -l        # partition table
mkfs.ext4 /dev/sdb1  # format partition

# Mount
mount /dev/sdb1 /mnt/data
mount -t tmpfs tmpfs /tmp

# Permanent mount — /etc/fstab
# UUID=xxxx /mnt/data ext4 defaults 0 2

umount /mnt/data