Exploring and Navigating Disk Usage
Launching ncdu
To launch ncdu, simply open a terminal on your Ubuntu 22.04 system and type the following command:
sudo apt-get install ncdu
ncdu
This will install the ncdu package (if it's not already installed) and start the ncdu application.
Navigating the Disk Usage Interface
Once ncdu is running, you'll be presented with a text-based interface that displays the disk usage information for the current directory. Here's how you can navigate through the interface:
- Arrow Keys: Use the up and down arrow keys to navigate through the list of files and directories.
- Enter: Press the Enter key to expand a directory and view its contents.
- Backspace: Press the Backspace key to navigate back to the parent directory.
- Quit: Press the
q
key to quit the ncdu application.
Exploring Disk Usage Details
As you navigate through the directories, ncdu will display the following information for each item:
- File/Directory Name: The name of the file or directory.
- Size: The size of the file or the total size of the directory.
- Percentage: The percentage of the total disk usage that the file or directory occupies.
You can use this information to quickly identify the largest consumers of disk space on your system.
Customizing the Display
ncdu offers several options to customize the way the disk usage information is displayed. You can access these options by pressing the ?
key while in the ncdu interface. Some of the available customizations include:
- Sorting: Sort the items by name, size, or percentage.
- Units: Choose the units (bytes, kilobytes, megabytes, etc.) used to display file and directory sizes.
- Filters: Apply filters to show or hide specific files or directories.
By exploring and navigating the disk usage interface, you'll be able to quickly identify and manage the storage consumption on your Ubuntu 22.04 system.