They say a picture is worth a thousand words. This age-old saying applies to disk usage as well. As your Linux system becomes old, chances are that you start to run out of the disk space. Visualizing disk usage can help you in this case with understanding how the overall disk space is being used, so you can be better prepared to clean it up.
In this tutorial, I describe how to visualize disk usage on Linux.
Baobab is a GNOME disk usage analyzer. Its biggest advantage is the intuitive visualization interface. Baobab can analyze the whole file system tree, a particular directory tree or even remote folders over network.
Install Baobab Visual Disk Space Analyzer on Linux
To install Baobab on Debian, Ubuntu or Linux Mint:
To install Baobab on Fedora, CentOS or RHEL:
Visualize Disk Usage with Baobab
For disk usage visualization, launch Baobab as follows.
Baobab reports the result of disk usage analysis in two panels: per-directory disk utilization stats are reported in numbers in the left panel, and the overall disk utilization is visualized in the right panel. Note that Baobab does not consider /proc or any other non-plain files such as symlinks, block devices, etc.
Baobab supports the following two different visualization methods.
In the ring chart, multiple concentric circles indicate directories in the directory tree, and the center of the circles corresponds to the root of the directory tree. The smaller a circle is, the higher a corresponding directory ranks in the directory hierarchy. If you hover a mouse on any particular directory, it will show the names of its sub-directories on the immediate outer circle. You can tell the relative sizes of the sub-directories by comparing their sizes in a ring-shaped area.
Another visualization mode of Baobap is treemap charts, where overlapping rectangles are used to visualize the hierarchical structure of directories. In this case, the outermost rectangle corresponds to the root of the directory tree, and the inner rectangles to sub-directories. The size of each rectangle indicates the size of a corresponding sub-directory. You can hover a mouse to check the name of a sub-directory.
Visualize Disk Usage of Remote Disks
Baobab can analyze local folders as well as remote folders. To examine remote folders, click on "Scan a Remote Folder" button. Baobap supports SSH, FTP, WebDAV and Windows Share.
Once Baobab is installed on Ubuntu, you can use Baobab's visual disk usage analyzer within Nautilus file manager. Simply right-click a particular folder on Nautilus, and choose "Open with Disk Usage Analyzer" menu. Baobab works only on folders, not on individual files.
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.