Linux Disk Management: Inspect, Mount, and Format with df, du, mount, and fdisk

Linux RSH Network November 30, 2025 1 min read

Learn how to inspect disk usage, mount drives, and manage partitions in Linux using df, du, mount, and fdisk

πŸ’½ Why Disk Management Matters

Efficient disk management prevents system slowdowns, avoids unexpected storage failures, and supports adding or managing external drives. Understanding these commands is essential for Linux admins and beginners alike.


πŸ“Š Inspecting Disk Usage

Command Purpose Example
df -h Show disk space usage Human-readable list of mounted filesystems
du -sh /var/log Show size of a directory Summarizes total used space by /var/log

πŸ”— Mounting Drives

Mounting makes a device accessible through the Linux file system.

Mount a Device

 
sudo mount /dev/sdb1 /mnt/usb
  • /dev/sdb1 → Device name

  • /mnt/usb → Mount point

Unmount a Device

 
sudo umount /mnt/usb

🧱 Partitioning with fdisk

Use fdisk to manage partitions on storage devices.

 
sudo fdisk /dev/sda

Inside fdisk:

  • m — Show help

  • p — Print partition table

  • n — Create new partition

  • d — Delete partition

  • w — Write changes

⚠️ Changes are permanent — always confirm before writing.


🧠 Pro Tips

  • View all block devices:

     
    lsblk
  • Get filesystem UUIDs (useful for fstab):

     
    blkid
  • Always backup data before partitioning or formatting.


πŸš€ What’s Next?

Tomorrow’s post will cover Linux Networking Basics — learning ip, ping, netstat, and ss to inspect and troubleshoot network connections.

Advertisement

R
RSH Network

39 posts published

Sign in to subscribe to blog updates