• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / Ubuntu / How To Check Total Hard Disk Size In Ubuntu Terminal

How To Check Total Hard Disk Size In Ubuntu Terminal

By Sourabh / July 23, 2022 Category: How To, Ubuntu

Which is the command to check the disk size in Linux? Learn how to see disk space in Ubuntu terminal; check total disk space in Linux.

Use lsblk command to show disk space

Run the following command to list the disk and as well as partitions and filesystems formatted on them.

lsblk -f

The lsblk command is used to lists information about all available or the specified block devices. The lsblk command reads the sysfs filesystem and udev db to gather information. The command prints all block devices (except RAM disks) in a tree-like format by default.

To list the the empty devices, run the lsblk command with -a or –all command option. By default they are skipped.

Using df Command

The simplest df command is by itself. Without any command parameters. When executed the df command displays the information about the file system disk space usage. It shows the device name, total blocks, total disk space, used disk space, free disk space and mount points.

df

Using the df command with -a or –all it shows dummy file systems information along with all the basic file system disk usage info:

df -a

Linux Command To Check Hard Disk Size in GB

As the disk space is shown in 1K blocks by default, users can use “-h” command parameter to show the file system disk space usage data in “human readable” format.

df -h

Show Hard Disk Information using lshw

sudo lshw -class disk

The lshw is a small tool to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 or IA-64 systems.

The -C or -class is used to only show the given class of hardware. class can be found using lshw -short or lshw -businfo.

You can also use fdisk or hwinfo commands to get disk info in Terminal.

Primary Sidebar

Latest Posts

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

Use Locate Command To Find File In Linux Terminal By Name

How To Change Terminal Color In Ubuntu Command Line

How To Run Fsck Manually In Linux To Fix Unexpected Inconsistency

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap