• 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 / How To / How To Check Total Hard Disk Size In Ubuntu Terminal

How To Check Total Hard Disk Size In Ubuntu Terminal

By Sourabh / May 29, 2022 Category: How To, Ubuntu

How to check total hard disk size in Ubuntu terminal. Here is a Linux hard disk info command to check hard drive in Ubuntu terminal.

Command to Check Hard Disk Size in Linux Ubuntu

Two most popular commands to check hard disk size in Linux Ubuntu are:

  1. df command – Shows the amount of disk space used and available on Linux file systems. If no file name is given, the space available on all currently mounted file systems is shown. Disk space is shown in 1K blocks by default.
  2. du command – ‘du’ reports the amount of disk space used by the set of specified files and for each subdirectory (of directory arguments).

df Command

The “df” command is for “disk filesystem” and is a great tool to know about the disk space usage on Linux Systems. The df command displays the amount of disk space available on the file system.

If no file name is given, the space available on all currently mounted file systems is shown. Disk space is shown in 1K blocks by default, unless the environment variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used.

If an argument is the absolute file name of a disk device node containing a mounted file system, df shows the space available on that file system rather than on the file system containing the device node (which is always the root file system).

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

Command to Display the Total Disk Usage of the Current Directory

‘du’ reports the amount of disk space used by the set of specified files and for each subdirectory (of directory arguments).

With no arguments, ‘du’ reports the disk space for the current directory. Normally the disk space is printed in units of 1024 bytes, but this can be overridden.

Primary Sidebar

Latest Posts

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

Linux Command To Check RAM Size In Ubuntu Terminal In GB

How To Install Proprietary Drivers In Linux Ubuntu Using Terminal

How To Shutdown Linux With A 15 Minute Delay And Message

Free AI Courses With Certificate For Beginners In India

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

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