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?

4 Answers 4

24

df -h /dev/root

Filesystem      Size  Used Avail Use% Mounted on
/dev/root       2.3G  2.1G   86M  97% /
0
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.

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.

1

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

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.