20

I have a raspberry pi, I've downloaded quite a few extras on it.

I would like to be able to check how much memory I have left on my SD card. Is there a command that tells you memory available? Is the info in a file somewhere? Or do I have to check it with another computer?

Dom
  • 305
  • 1
  • 4
  • 15

4 Answers4

24

df -h /dev/root

Filesystem      Size  Used Avail Use% Mounted on
/dev/root       2.3G  2.1G   86M  97% /
Brent Faust
  • 356
  • 3
  • 6
8

As others have mentioned, df -h will give you overview. Also useful:

du -csh (show total disk space used in current tree)

du -csh /path (show total space used in specified tree)

du -csh (show space used in subdirectories)

You can also install the durep package which will give you a more granular breakdown of disk usage.

bobstro
  • 3,998
  • 14
  • 27
7

Issuing

df -h

from SSH or the terminal is by far the easiest way to view disk space on all devices, on any Linux computer.

syb0rg
  • 8,188
  • 4
  • 37
  • 51
foibs
  • 803
  • 1
  • 8
  • 9
1

SUre you can use df or du but you can also get fancy with ncdu ! Very useful.

enter image description here

kyjanond
  • 231
  • 1
  • 3