Skip to content

Instantly share code, notes, and snippets.

@imneonizer
Created February 29, 2020 04:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imneonizer/ff301355d5dffa5d13f1520c1a0b3d57 to your computer and use it in GitHub Desktop.
Save imneonizer/ff301355d5dffa5d13f1520c1a0b3d57 to your computer and use it in GitHub Desktop.

How to find disk usage information on linux

Install this simple tool ncdu for linux

sudo apt install ncdu

After this simply run the command:

sudo ncdu -x /

you will enter into navigation mode in the terminal using which you can find which directories are eating up space on your linux system.

sample output

    4,0GiB [##########] /usr
  579,3MiB [#         ] /root
  487,4MiB [#         ] /opt
   41,7MiB [          ] /lib
   22,7MiB [          ] /sbin
   21,2MiB [          ] /boot
   18,6MiB [          ] /etc
    9,1MiB [          ] /bin
    3,6MiB [          ]  core
  260,0KiB [          ] /build
   88,0KiB [          ] /tmp
e  16,0KiB [          ] /lost+found
    8,0KiB [          ] /media
    4,0KiB [          ] /lib64
e   4,0KiB [          ] /srv
e   4,0KiB [          ] /mnt
>   0,0  B [          ] /var
>   0,0  B [          ] /sys
>   0,0  B [          ] /run
>   0,0  B [          ] /proc
>   0,0  B [          ] /ovhbackup
>   0,0  B [          ] /home
>   0,0  B [          ] /dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment