How to Expand File System in Raspberry Pi

How to Expand Raspberry Pi File System

Expand Raspbian Filesystem: You will be shocked to see that the Raspbian file system’s size is smaller than the specified size of the SD card. Recently, I bought a 16GB Raspbian preinstalled SD Card from Amazon. To my amazement, I found its size smaller than 2GB. I Googled and found that by default, the size of the Raspbian root file system is only 2GB.

Here I will show how to expand the Raspbain filesystem and use full of the SD card.

Doing this will give you more free space for more software or more storage for files.

Expand Raspbian Filesystem

To achieve this, you will have to use raspi-config command or Raspberry Pi Software Configuration Tool.

  1. Open Terminal, type the following command and press ENTER
$raspi-config

When you ENTER this command you will get this screen.

Raspberry Pi Software Configuration Tool
Raspberry Pi Software Configuration Tool
  1. Use your arrow UP and DOWN key to move the selection UP and DOWN. Move the selection to
7 Advanced Options       Configure advanced settings
  1. Use your arrow LEFT and RIGHT to select <Select> or <finish> at the bottom. Here use the keys and select <Select>. Then press ENTER. You will get this page.
Raspberry Pi Software Configuration Tool
Raspberry Pi Software Configuration Tool

From this page, use arrow UP and DOWN keys to select:

A1 Exapnd Filesystem   Ensure that all of the SD card s

4. Use arrow RIGHT and LEFT to select <select> or <back> at the bottom. Here select <Select> and press ENTER.

5. Next, you will be redirected to the first configuration page because you have successfully expanded the filesystem. As shown below, select <Finish> found at the bottom of the page.

6. After you enter <Finish> you will be asked whether you want to reboot your device or not. Enter <Yes> by using arrow LEFT and RIGHT keys.

Raspberry Pi Software Configuration Tool
Raspberry Pi Software Configuration Tool

Now you are done!  Use the following command to check your filesystem. You will see that now the whole of your SD card is usable.

Use the following to command to check your file system:

$df -h
Raspberry Pi Software Configuration Tool
Raspberry Pi Software Configuration Tool

Here you will notice that now my /dev/root size is 15GB as it should be.

You may also like to read:

  1. How to connect to Raspberry Pi using VNC Viewer or SSH 
  2. OpenCV with Python: Loading Video Source
  3. Python 3.x with OpenCV Installation 

Leave a Reply

Discover more from BHUTAN IO

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top