Raspberry Pi

How to Expand File System on Raspberry Pi

The simplicity of the Raspberry Pi makes it one of the most widely used single-board device. Besides using it as a desktop computer, you can use it for creating different projects in the field of robotics, database management, home automation and more. However, to store the project’s data and efficiently perform them on Raspberry Pi, you must need to have enough storage on the SD card. Though having an SD card storage around 32GB is enough for performing different operation, but the case may arrive when you may run out of storage. Instead of looking for other alternatives, you can fix the issue by expanding the file system on Raspberry Pi so that it utilizes the full available space on the system.

This article is a detailed guideline in showing you the easy way to expand the Raspberry Pi file system.

Expand File System on Raspberry Pi

By default, the Raspberry Pi’s SD card doesn’t utilize the full root file system because the extra space is kept for emergency purpose. If somehow your SD card runs out of memory, you can fix it by utilizing this space for an extra storage. You do this expansion on your Raspberry Pi system from the Raspberry Pi configuration, which you can open on terminal through following command:

$ sudo raspi-config

A Raspberry Pi configuration window will pop out and there you have to go to the “Advanced Options”.

Select the “Expand Filesystem” option.

Text Description automatically generated

Select “Ok” by pressing the Enter button to expand the filesystem on Raspberry Pi.

Graphical user interface, text, application Description automatically generated

After that, select the “Finish” option in the main Raspberry Pi configuration window.

Graphical user interface, text, application Description automatically generated

The system will ask for confirmation to reboot the system to apply the changes and you have to allow it using the “Yes” option.

Graphical user interface, application Description automatically generated

To confirm either storage expanded or not, you need to put the following command in the terminal.

$ df -h

A picture containing text Description automatically generated

Conclusion

Expanding the root file system on Raspberry Pi can fix the issue of low memory space on your Raspberry Pi system. If your system runs out of space, you can run the terminal and open the Raspberry Pi configuration through “raspi-config” command. Later, you will find the “Expand File System” option in the “Advanced Options” section and increase the root file system by selecting the option. You must reboot the system so that it successfully expands the root file system on Raspberry Pi.

About the author

Muhammad Nasir

Hi! I am an engineer and technical blogger by profession and I enjoy getting things done with electronics. I am using this platform to share my knowledge in the field of Raspberry Pi, Linux, and Embedded Systems with others.