π½ 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
-
/dev/sdb1 → Device name
-
/mnt/usb → Mount point
Unmount a Device
π§± Partitioning with fdisk
Use fdisk to manage partitions on storage devices.
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:
-
Get filesystem UUIDs (useful for fstab):
-
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.
FAQs (0)
Sign in to ask a question. You can read FAQs without logging in.