Chapter 1-2: Hardware and Disk Management



Chapter 1-2: Hardware and Disk Management
Whether you're setting up a new system or troubleshooting performance issues, it's critical to understand the underlying hardware—especially storage devices and their behavior.
On this page, we explore how Linux and Windows expose low-level disk information and performance stats through the command line. These tools help you understand what's connected, how full your disks are, and how actively they’re being used.
💽 4. List Connected Storage Devices
✅ Purpose
Lists connected drives, partitions, and mount points—useful for identifying USB drives, internal disks, or new volumes.
💻 Windows
C:\> wmic logicaldisk get name
📋 Sample Output
Name
C:
D:
E:
🐧 Linux
$ lsblk
📋 Sample Output
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 500G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
├─sda2 8:2 0 488G 0 part /
└─sda3 8:3 0 12G 0 part [SWAP]
sdb 8:16 1 32G 0 disk
└─sdb1 8:17 1 32G 0 part /media/usb
📊 5. Check Disk Usage
✅ Purpose
Displays how much space is used vs. available on each partition. Essential for monitoring capacity or finding storage bottlenecks.
💻 Windows
C:\> Get-PSDrive
📋 Sample Output
Name Used Free Provider Root
---- ---- ---- -------- ----
C 92.4 GB 30.1 GB FileSystem C:\
D 14.0 GB 45.9 GB FileSystem D:\
🐧 Linux
$ df -h
📋 Sample Output
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 488G 102G 361G 23% /
/dev/sda1 512M 45M 467M 9% /boot/efi
/dev/sdb1 32G 10G 22G 32% /media/usb
🚀 6. Monitor Disk I/O Activity
✅ Purpose
Measures how actively your disks are reading and writing data—key for diagnosing performance issues like high I/O wait.
💻 Windows
C:\> typeperf "\PhysicalDisk(*)\Disk Transfers/sec"
📋 Sample Output (Partial)
"(PDisk(_Total))\Disk Transfers/sec","(PDisk(0 C:))\Disk Transfers/sec"
"04/24/2025 15:22:12.902","12.000000","15.000000"
"04/24/2025 15:22:13.902","10.000000","13.000000"
🐧 Linux
$ iostat
📋 Sample Output
Linux 5.15.0-89-generic (mymachine) 04/24/25 _x86_64_
Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sda 3.44 24.52 92.18 292840 1100780
sdb 0.00 0.00 0.00 0 0
🧩 Summary
Feature | Windows Command | Linux Command |
---|---|---|
List Drives | wmic logicaldisk get name | lsblk |
Check Disk Usage | Get-PSDrive (PowerShell) | df -h, du -sh |
Monitor Disk I/O | typeperf "\PhysicalDisk...\Disk..." | iostat |
Linux’s tooling allows for granular control and more detailed reporting at the command line, making it ideal for engineers and sysadmins who need precise visibility into disk behavior.
✅ Coming Up Next
In Part 3: Network Management, we shall explore how to list interfaces, view open ports, and monitor network traffic on Linux with CLI tools comparable to Windows.
Stay tuned.