Ncdu (NCurses Disk Usage) is a curses-based version of the well-known 'du', and provides a fast way to see what directories are using your disk space using command line. A disk usage analyzer with an ncurses interface, aimed to be run on a remote server where you don't have an entire graphical setup, but have to do with a simple SSH connection to Raspberry Pi.
It provides an interface to display the information in a more intuitive way like columns for how much disk space used in megabytes, gigabytes and graphical bar usage, file/directory names, Tree view with sizes,
Preview[su_spoiler title="Screenshot on Raspberry Pi's SSH" icon="caret" open="yes"] [/su_spoiler]
Install NcduIn order for the Raspberry Pi to analyze disk usage from command line you need to install packages on the Raspberry. You are going to need the following packages
- Ncdu Ncdu is an ncurses-based du viewer. It provides a fast and easy-to-use interface through famous du utility. It allows one to browse through the directories and show percentages of disk usage with ncurses library.
sudo apt-get update sudo apt-get install ncdu
Usage for NcduTo use ncdu it's easy as you using ls -l, just enter a directory you want to analyze then run ncdu to analyze the directory or disk usage.
To analyze root directory
sudo ncdu /To analyze /home/pi directory