Skip to content

Linux Disk Utilities

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux Disk Utilities Guide

Complete beginner-friendly guide to disk utilities on Linux, covering Arch Linux, CachyOS, and other distributions including disk partitioning, formatting, disk health checks, and disk management tools.


Table of Contents

  1. Partitioning Tools
  2. Formatting Tools
  3. Disk Health
  4. Disk Cloning
  5. Troubleshooting

Partitioning Tools

fdisk

Use fdisk:

# Install fdisk
sudo pacman -S util-linux

# Partition disk
sudo fdisk /dev/sda

# Commands:
# n - new partition
# d - delete partition
# w - write changes

cfdisk

Use cfdisk:

# Install cfdisk
sudo pacman -S util-linux

# Partition disk
sudo cfdisk /dev/sda

parted

Use parted:

# Install parted
sudo pacman -S parted

# Partition disk
sudo parted /dev/sda

GParted

Install GParted:

# Install GParted
sudo pacman -S gparted

# Launch
sudo gparted

Formatting Tools

mkfs

Format partitions:

# Format as ext4
sudo mkfs.ext4 /dev/sda1

# Format as btrfs
sudo mkfs.btrfs /dev/sda1

# Format as xfs
sudo mkfs.xfs /dev/sda1

Disk Health

SMART

Check disk health:

# Install smartmontools
sudo pacman -S smartmontools

# Check disk
sudo smartctl -a /dev/sda

# Short test
sudo smartctl -t short /dev/sda

badblocks

Check for bad blocks:

# Check bad blocks
sudo badblocks -v /dev/sda

Disk Cloning

dd

Clone disk:

# Clone disk
sudo dd if=/dev/sda of=/dev/sdb bs=4M status=progress

# Warning: Can destroy data!

Clonezilla

Use Clonezilla:

# Download ISO from clonezilla.org
# Boot from ISO
# Follow wizard

Troubleshooting

Disk Not Detected

Check disk:

# List disks
lsblk

# Check kernel messages
dmesg | grep -i disk

Summary

This guide covered disk utilities for Arch Linux, CachyOS, and other distributions, including partitioning, formatting, and disk health.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally