• About Us
    • Contact Us
    • Write for US
  • Terms
    • Newsletter
    • Affiliate Link Policy
    • DMCA
  • Privacy
  • Forums
    • African History
    • African Walk of Fame
  • Nyosake Ltd
    • Car Head
    • Business Today
    • Android News
    • Afrobays
    • The Sun
    • NS Sports
    • PodCast
    • Gadget
    • Travel
    • Play IT
    • Invest News
    • Start A Blog Easily Here
  • Advertise
Nyongesa Sande
  • News
    • Africa
    • African Inventions
    • African History
    • Qatar
    • Politics
    • Counties
    • National
    • Health
  • How To
    • Made In Africa
    • Education
    • Facts
    • Science
  • Business
    • Sponsored
    • Real Estate
    • World Billionaires
    • Wealth
    • Advertisement
  • Apple
    • iPad
    • Artists
    • iPhone
    • Apple Watch
    • Mac Specs
    • Apple TV
  • Windows
    • Windows 10
    • Surface
    • PC Components
    • Laptops
    • ChromeBooks
  • Tech
    • Tech Terms
    • Phones
    • Phone Rumors
    • Android News
    • Top Deals
    • Gadget Reviews
    • Gift Guides
    • VPN
  • Autos
    • Car Showrooms
    • Car News
    • Latest Cars
    • Auto Sport
    • Car Facts
  • Top 100
  • Sports
    • Soccer LiveScores
    • Basketball Scores
  • Entertainment
    • Celebrities
    • Lyrics
    • Artists
    • Biography
  • HSE
    • Hazards
    • NEBOSH
    • IOSH
    • Construction Safety
    • General Industry
    • Oil & Gas Safety
    • All Safety Courses
  • Forums
No Result
View All Result
  • News
    • Africa
    • African Inventions
    • African History
    • Qatar
    • Politics
    • Counties
    • National
    • Health
  • How To
    • Made In Africa
    • Education
    • Facts
    • Science
  • Business
    • Sponsored
    • Real Estate
    • World Billionaires
    • Wealth
    • Advertisement
  • Apple
    • iPad
    • Artists
    • iPhone
    • Apple Watch
    • Mac Specs
    • Apple TV
  • Windows
    • Windows 10
    • Surface
    • PC Components
    • Laptops
    • ChromeBooks
  • Tech
    • Tech Terms
    • Phones
    • Phone Rumors
    • Android News
    • Top Deals
    • Gadget Reviews
    • Gift Guides
    • VPN
  • Autos
    • Car Showrooms
    • Car News
    • Latest Cars
    • Auto Sport
    • Car Facts
  • Top 100
  • Sports
    • Soccer LiveScores
    • Basketball Scores
  • Entertainment
    • Celebrities
    • Lyrics
    • Artists
    • Biography
  • HSE
    • Hazards
    • NEBOSH
    • IOSH
    • Construction Safety
    • General Industry
    • Oil & Gas Safety
    • All Safety Courses
  • Forums
No Result
View All Result
No Result
View All Result

How to Check your Disk Usage on Ubuntu from the command line

May 6, 2021
in Windows
Reading Time: 4 mins read
A A
ShareTweetShareShareScanEmail
ADVERTISEMENT

How to Check your Disk Usage on Ubuntu from the command line Ubuntu Linux, like all unix varieties, includes the du command line utility. du stands for Disk Usage, as I’m sure you assumed.

How much space do I have free on my Linux drive?

Managing disk space on a Linux server is an important task. For example, package manager applications notify you how much disk space will be required for an installation. For that information to be meaningful, you should know how much space your system has available.

Prerequisites

  • A Linux-based system
  • A terminal window / command line
  • A user account with sudo or root privileges
  • The df command stands for disk free, and it shows you the amount of space taken up by different drives. By default, df displays values in 1-kilobyte blocks.

    Display Usage in Megabytes and Gigabytes

    You can display disk usage in a more human-readable format by adding the –h option:
    df –h

    This displays the size in kilobytes (K), megabytes (M), and gigabytes (G).

Check Linux Disk Space Using df Command

You can check your disk space simply by opening a terminal window and entering the following:

In this tutorial, learn how to use the df command to check disk space in Linux and the du command to display file system disk space usage.

Go ahead, just type the command in your home directory:

ADVERTISEMENT
ADVERTISEMENT

nyongesa@ubuntu-desktop:~$ du
8 ./.gconf/desktop/gnome/accessibility/keyboard

12 ./.gconf/desktop/gnome/accessibility
8 ./.gconf/desktop/gnome/screen/default/0
12 ./.gconf/desktop/gnome/screen/default
16 ./.gconf/desktop/gnome/screen
8 ./.gconf/desktop/gnome/font_rendering
40 ./.gconf/desktop/gnome
44 ./.gconf/desktop
8 ./.gconf/apps/panel/applets/clock_screen0/prefs
16 ./.gconf/apps/panel/applets/clock_screen0
8 ./.gconf/apps/panel/applets/trashapplet_screen0
8 ./.gconf/apps/panel/applets/workspace_switcher_screen0/prefs
16 ./.gconf/apps/panel/applets/workspace_switcher_screen0

It shows you a very verbose output by default, which isn’t always extremely useful. Thankfully it also includes a lot of extra options.

To find the total size of files and folders in our current directory, listed by MB:

nyongesa@ubuntu-desktop:~$ du -s -m *
1 Desktop
0 Examples
17 VMwareTools-5.5.2-29772.tar.gz

Understanding the Output Format

 

The df command lists several columns:

Filesystem         Size      Used     Avail    Use%    Mounted on

udev               210M        0        210M     0%       /dev

tmpfs              49M       1004K      48M      3%       /run

/dev/sda2          7.9G       4.3G      3.2G     58%      /

Your output may have more entries. The columns should be self-explanatory:

  • Filesystem – This is the name of each particular drive. This includes physical hard drives, logical (partitioned) drives, and virtual or temporary drives.
  • Size – The size of the filesystem.
  • Used – Amount of space used on each filesystem.
  • Avail – The amount of unused (free) space on the filesystem.
  • Use% – Shows the percent of the disk used.
  • Mounted on – This is the directory where the file system is located. This is also sometimes called a mount point.

The list of filesystems includes your physical hard drive, as well as virtual hard drives:

  • /dev/sda2 – This is your physical hard drive. It may be listed as /sda1, /sda0, or you may even have more than one. /dev stands for device.
  • udev – This is a virtual directory for the /dev directory. This is part of the Linux operating system.
  • tmpfs – You may have several of these. These are used by /run and other Linux processes as temporary filesystems for running the operating system. For example, the tmpfs /run/lock is used to create lockfiles. These are the files that prevent multiple users from changing the same file at the same time.

Display a Specific File System

The df command can be used to display a specific file system:

df –h /dev/sda2

You can also use a backslash:

df –h /

This displays the usage on your primary hard drive. Use the mount point (in the Mounted on column) to specify the drive you want to check.

Note: The df command only targets a full filesystem. Even if you specify an individual directory, df will read the space of the whole drive.

Now we are getting somewhere. That’s some pretty useful output.

ADVERTISEMENT
Was this article helpful?
YesNo
ShareTweetSendShareScanSend
ADVERTISEMENT
Previous Post

How to Install VMware Tools on Ubuntu Edgy Eft

Next Post

Check your Disk Usage on Ubuntu with Disk Usage Analyzer

Related Posts

How to Unlock the Touchpad on a Lenovo Laptop

2 months ago
Details: Windows 11 is a free upgrade

How to Control the CPU Fan on Windows 11

2 months ago
Next Post
How to Add extra Repositories on Ubuntu

Check your Disk Usage on Ubuntu with Disk Usage Analyzer

How to Obtain a Land Rent Clearance Certificate in Kenya

How to Obtain a Land Rent Clearance Certificate in Kenya

Search NyongesaSande.com

Follow Nyongesa Sande


Follow @nyongesasande

Subscribe to Nyongesa Sande




Editorial policy

Permission to use quotations from any article is granted subject to appropriate credit of the source being given by referencing the direct link of the article on AfroBays. However, reproducing any content on this site without explicit permission is strictly prohibited.

Follow us on Social Media channels Below:

  Twitter   Instagram     Youtube  Facebook 
Make sure to check out our social media to keep track of the latest content.
Disclaimer: We aim to present the most accurate information possible. Through this website, you might link to other websites which are not under our control. We have no control over the nature, content and availability of those websites. Inclusion of any links does not necessarily imply a recommendation or endorsement of the views expressed within them. All content on this website is copyright to the website’s owner and all rights are reserved. We take no responsibility for, and will not be liable for, the website being temporarily unavailable due to technical issues beyond our control.
 
ADVERTISEMENT
Facebook Twitter Instagram Pinterest LinkedIn Youtube RSS

Categories

A BAKE Member

© 2022 Nyongesa Sande - So Much More To Read Now. A Nyosake Investment Inc.

No Result
View All Result
  • News
    • Africa
    • African Inventions
    • African History
    • Qatar
    • Politics
    • Counties
    • National
    • Health
  • How To
    • Made In Africa
    • Education
    • Facts
    • Science
  • Business
    • Sponsored
    • Real Estate
    • World Billionaires
    • Wealth
    • Advertisement
  • Apple
    • iPad
    • Artists
    • iPhone
    • Apple Watch
    • Mac Specs
    • Apple TV
  • Windows
    • Windows 10
    • Surface
    • PC Components
    • Laptops
    • ChromeBooks
  • Tech
    • Tech Terms
    • Phones
    • Phone Rumors
    • Android News
    • Top Deals
    • Gadget Reviews
    • Gift Guides
    • VPN
  • Autos
    • Car Showrooms
    • Car News
    • Latest Cars
    • Auto Sport
    • Car Facts
  • Top 100
  • Sports
    • Soccer LiveScores
    • Basketball Scores
  • Entertainment
    • Celebrities
    • Lyrics
    • Artists
    • Biography
  • HSE
    • Hazards
    • NEBOSH
    • IOSH
    • Construction Safety
    • General Industry
    • Oil & Gas Safety
    • All Safety Courses
  • Forums

© 2022 Nyongesa Sande - So Much More To Read Now. A Nyosake Investment Inc.