16

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?

19

df -h /dev/root

Filesystem      Size  Used Avail Use% Mounted on
/dev/root       2.3G  2.1G   86M  97% /
7

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.

6

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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