Skip to content

How to manage disk storage in Linux

You have a Linux distribution, for example Ubuntu Linux, and you need to run commands to manage the allocated disk space as well as to check partitions and mount points.

This article provides guidance on how to manage disk space in Linux.

You should run the following Linux commands to manage allocated disk space and to check partitions and mount points.

#The below command shows all available disks and partitions
fdisk -l
fdisk -l | grep /dev/sd

#The below command shows a summary of the allocated disk space to all partitions
df

#The below df command
df -H /dev/sda

#The below command is similar to df but uses a graphical tabular interface for better readability
duf -all

#The below command lists block storage devices
lsblk
#Also command lsusb lists the usb interface devices

#The below command provides a tabular output for all disks and partitions
cfdisk

#You can check various configuration files to query information about disks and partitions
cat /proc/partitions
cat /etc/fstab
cat /etc/fstab.d
cat /etc/mtab
cat /proc/self/mountinfo

#The tree command displays the hierarchical folder structure either from / or from another directory
tree

#The gparted command is the graphical interface to parted
#The GNU partition management tool
parted

# The below command displays a tabular list of mounts and can be used with grep to narrow down results
findmnt

#Similar to findmnt, the mount command provides a list of all mounts
mount

To format an attached disk from the Linux command line run the following command.

# Format disk /dev/sdb to create partitions
fdisk /dev/sdb
# For above command choose default options and click w to exit the fdisk command
# Now format the file system inside the created partition
mkfs.ext4 -L [label] /dev/sdb1
#Now mount the newly formatted partition to a mount point (mount point folder must already exist)
mount /dev/sdb1 /mymountpoint

  1. Triage: Review monitoring dashboards or error metrics for initial anomaly spikes or timeout signatures.
  2. Record Evidence: Export service diagnostic logs, event viewers, or failure traces.
  3. Analyze: Correlate error signatures against known infrastructure or configuration limits.
  4. Correlate: Match active incident timeline against recent deployments or scale events.
  5. Execute & Verify: Apply corrective remediation steps and verify telemetry baseline recovery.

5. Vendor Documentation & Validation Guardrails

Section titled “5. Vendor Documentation & Validation Guardrails”
  • Authority Reference: Cross-reference configuration changes against official vendor documentation.
  • Validation Gate: Require staging environment testing and Human-in-the-Loop SME approval before production changes.