Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStats

Categories

πŸ€– Artificial Intelligence
☁️ Cloud and Infrastructure
πŸ’Ύ Data and Databases
πŸ’Ό Professional Skills
🎯 Programming and Development
πŸ”’ Security and Networking
πŸ“š Specialized Topics
HomeAboutTopicsPricingMy VaultStats
LEVEL 0
0/5 XP
GitHub
Β© 2026 CheatGridβ„’. All rights reserved.
Privacy PolicyTerms of UseAboutContact

Disk and Storage Management in Linux Cheat Sheet

Disk and Storage Management in Linux Cheat Sheet

Back to Operating Systems and CLI
Updated 2026-05-20
Next Topic: Environment Variables and Shell Configuration Files Cheat Sheet

Disk and storage management is a core sysadmin discipline that spans everything from querying free space to building redundant RAID arrays. Linux exposes a rich, layered toolkit β€” starting with read-only observation commands like df and lsblk, through partitioning tools such as fdisk and parted, on to filesystem creation with mkfs, persistent mounting via /etc/fstab, and flexible logical-volume abstraction through LVM. The key mental model is the storage stack: raw block devices β†’ partition tables β†’ filesystems β†’ mount points β€” and every command in this cheat sheet operates at one of those layers.

What This Cheat Sheet Covers

This topic spans 18 focused tables and 183 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Disk Space and Usage ObservationTable 2: Block Device InspectionTable 3: Partitioning ToolsTable 4: Filesystem CreationTable 5: Mounting and UnmountingTable 6: /etc/fstab ConfigurationTable 7: Filesystem Check and RepairTable 8: Filesystem ResizingTable 9: LVM β€” Logical Volume ManagerTable 10: LVM Thin ProvisioningTable 11: Software RAID with mdadmTable 12: RAID Levels OverviewTable 13: Btrfs Subvolumes and SnapshotsTable 14: Disk Encryption with LUKS and cryptsetupTable 15: SSD Management and TRIMTable 16: Swap Space ManagementTable 17: Disk Health MonitoringTable 18: Network Filesystem Mounting

Table 1: Disk Space and Usage Observation

These are the commands you reach for first when diagnosing storage issues or auditing capacity. df reports filesystem-level free/used blocks while du digs into directory trees; together they answer "how full is the disk?" and "what is taking up space?"

CommandExampleDescription
df -h
df -h
Reports free and used space on all mounted filesystems in human-readable units (K, M, G, T).
df -hT
df -hT
Adds a filesystem type column (ext4, xfs, tmpfs) alongside usage data; useful to distinguish local vs. network mounts.
df -ih
df -ih
Shows inode usage instead of block usage; critical when writes fail despite df -h showing free space.
df -hT /path
df -hT /home
Checks space and type for the filesystem hosting a specific path.
df -t TYPE
df -t ext4 -h
Filters output to only the specified filesystem type.
df -x TYPE
df -x tmpfs -h
Excludes a filesystem type from output; removes tmpfs/devtmpfs clutter for a cleaner view.
df --total
df -h --total
Appends a grand-total row summing all listed filesystems.
df --output
df --output=source,size,used,avail,pcent
Selects specific columns to display, useful for scripting.

More in Operating Systems and CLI

  • Debian Cheat Sheet
  • Environment Variables and Shell Configuration Files Cheat Sheet
  • AWS CLI Cheat Sheet
  • GCP CLI Cheat Sheet
  • macOS Usage Cheat Sheet
  • Windows 11 Troubleshooting Cheat Sheet
View all 31 topics in Operating Systems and CLI