facebook youtube pinterest twitter reddit whatsapp instagram

Viewing Disk Usage in Ubuntu

There are several ways to view disk usage in your Linux system, and that is what we would be going over in this guide...

Out of the box, Linux provides us the df command, which is the standard Unix command used to display the amount of available disk space for file systems.

To view the disk usage information, run the dfcommand:

user@server: df
Filesystem     1K-blocks    Used Available Use% Mounted on
udev              489564       0    489564   0% /dev
tmpfs             100872    3024     97848   3% /run
/dev/vda1       25786076 3066240  21647452  13% /
tmpfs             504360       0    504360   0% /dev/shm
tmpfs               5120       0      5120   0% /run/lock
tmpfs             504360       0    504360   0% /sys/fs/cgroup
tmpfs             100872       0    100872   0% /run/user/0

This above is measured in bytes, to get a human readable format, you use df with the -h option, so, df -h gives us:

user@server: df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            479M     0  479M   0% /dev
tmpfs            99M  3.0M   96M   3% /run
/dev/vda1        25G  3.0G   21G  13% /
tmpfs           493M     0  493M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           493M     0  493M   0% /sys/fs/cgroup
tmpfs            99M     0   99M   0% /run/user/0

It shows you the filesystem, its size, how much space is used, how much is available, how much percentage is being used (used percentage), and the filesystem the device is mounted on.

The output will look differently depending on the types of disks and mount points on your system, for example, /dev/vda1 is my disk storage, it might be different for you, e.g you might see /dev/sda and so on.

Enjoy!

Related Post(s)

  • Monitoring Multiple Log Files In RealTime With MultiTail (Ubuntu)

    Oh my... I really find scanning through the logs file time consuming, and painful. Luckily for me, I founded Multitail, which is an awesome, and powerful tool for not only browsing through several f

  • How To Find Files Using Locate in Ubuntu

    It's kind of frustrating when you are searching for a particular file, and you have no idea of how to find it, In this guide, I'll walk you through on two different ways you can find a file in your G

  • Managing MariaDB Databases (Ubuntu Server)

    In this guide, you'll learn how to manage MariaDB databases in your terminal, from connecting to the database server using the mariadb command, creating a database, removing (drop) database, and mana

  • Understanding & Using Symbolic & Hard Links (Ubuntu)

    Have you ever wondered how you can create shortcuts that link to other files in Linux? Well, let me introduce you to symbolic and hard links. The two types of links in Linux are symbolic links and ha

  • Installing and Using NCDU (NCurses Disk Usage)

    ncdu is a curses-based version of the well-known 'du' command and provides a fast way to see what directories are using your disk space. What I love about this utility is that it can traverse the re

  • Finding Out File Using Up Disk Space With [du] in GNU/Linux

    It is a bit annoying when your disk space gets full, and you have no idea what is eating up the disk space, well, let me introduce you to ducommand, with this command you can get the disk usage of t