Expanding the size of a filesystem (raspi-config)

This recipe shows how you can use the raspi-config command to expand the Raspberry Pi's filesystem so that it uses all the available disk space on an SD card.

The operating system images for the Raspberry Pi are compacted and compressed to use as little disk space as possible. This reduction in the size of an operating system image helps improve the speed of downloading the image. When these reduced images are copied to an SD card, it is very likely that the SD card will still have space left over. Larger SD Cards (greater than 8 GB) will be mostly empty!


If you used NOOBS to install the Raspberry Pi, you do not need to expand the filesystem. NOOBS has already expanded the filesystem for you. ...

Get Raspberry Pi Networking Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.