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.
To install Baobab on Debian, Ubuntu or Linux Mint:
To install Baobab on Fedora, CentOS or RHEL:
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.
Ring Charts
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.
Treemap Charts
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.
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.