Raspberry Pi Configuration Settings with raspi-config

Initial raspi-config screen with setup options.
Initial raspi-config screen with configuration options.

While working on our latest project with the Raspberry Pi, I was installing various modules on the Raspbian version of Linux, when I was informed that I had run out of disk space. I was confused, because the SD card I was using had 4 GB, and I was sure that the modules I had installed were not that large.  It turned out that when you initially flash the SD card, it sets up the root partition as though you have 2 GB free on the SD card.  To fully utilize the available space on the SD card, you need to repartition the root drive.  Fortunately, that turns out to be very easy with a built-in utility called “raspi-config”.  Just type in “raspi-config” at the prompt, and you see the screen pictured at right.  Choosing the second option “expand_rootfs” automatically configures the root partition to utilize all available space on the SD card.  As I mentioned in a previous post, this utility is also useful for changing the default keyboard setup and timezone if you don’t happen to be from England.  I had to do a bit of googling to figure this out, so I hope this post saves someone a little bit of effort.

Leave a Comment