lsblkShow disks, partitions, loop devices, and mountpoints.
Disk inventory, partitions, formatting, and capacity analysis for Linux systems.
Inspect block devices, filesystems, and space usage.
lsblkShow disks, partitions, loop devices, and mountpoints.
lsblk -fDisplay filesystem type, label, UUID, and mountpoint.
Useful when you want clean inventory output for documentation or scripts.
lsblk -o NAME,SIZE,FSTYPE,TYPE,MOUNTPOINTS,UUID,MODELUseful when you want clean inventory output for documentation or scripts.
blkidRead known filesystem, RAID, and partition metadata.
findmntDisplay the live mount tree with source, target, and options.
findmnt -S /dev/sda1Filter the mount table by source device.
df -hDisplay used and available capacity in human-readable units.
df -iCheck inode exhaustion when space looks free but writes fail.
du -sh .Estimate disk usage for the current directory tree.
du -xh --max-depth=1 /var | sort -hGreat first pass for finding where storage is going.
Inspect block size, available blocks, and filesystem ID for a mounted path.
stat -f /varInspect block size, available blocks, and filesystem ID for a mounted path.
file -s /dev/sdbRead magic signatures from a block device or image.
Create, inspect, and label partitions.
sudo fdisk -lShow disks, sector sizes, partition tables, and partitions.
sudo fdisk /dev/sdbInteractive MBR/GPT partitioning for a specific disk.
sudo parted /dev/sdb printDisplay partition table details using parted.
sudo parted /dev/sdb mklabel gptInitialize a disk with a GPT partition table.
sudo parted -a optimal /dev/sdb mkpart primary ext4 1MiB 100%Create a partition aligned for modern disks.
sudo partprobe /dev/sdbRefresh partition table changes without rebooting.
sudo sfdisk -d /dev/sdb > sdb.partitionsUseful for backups and repeatable partition layouts.
sudo sfdisk /dev/sdb < sdb.partitionsReplay a previously exported partition layout.
sudo wipefs /dev/sdbSee what signatures exist before repurposing a disk.
sudo wipefs -a /dev/sdbRemove existing filesystem, RAID, or partition signatures.
blkid -o export /dev/sdb1Good for preparing stable fstab entries.
Wait until udev finishes processing newly created partitions.
sudo udevadm settleWait until udev finishes processing newly created partitions.
Create filesystems and inspect or tune metadata.
sudo mkfs.ext4 /dev/sdb1Format a partition as ext4.
sudo mkfs.xfs /dev/sdb1Format a partition as XFS.
sudo mkfs.vfat -F 32 /dev/sdb1Useful for EFI partitions or removable media.
sudo mkswap /dev/sdb2Initialize a partition or file as swap.
sudo e2label /dev/sdb1 dataAssign a human-readable label to an ext filesystem.
sudo xfs_admin -L data /dev/sdb1Assign a label to an XFS filesystem.
sudo tune2fs -l /dev/sdb1Inspect features, UUID, mount count, and reserved blocks.
sudo tune2fs -m 1 /dev/sdb1Lower reserved space on large non-root data volumes.
sudo dumpe2fs -h /dev/sdb1Show ext superblock and journal settings.
sudo xfs_info /mnt/dataDisplay XFS geometry and feature flags.
sudo swapon /dev/sdb2Turn on swap after creating it.
swapon --showInspect active swap devices and priorities.