![Make Raspberry Pi Images Smaller With PiShrink In Linux][1]
**Raspberry Pi** requires no introduction. It is a small, affordable and credit-card sized computer that can be connected to a Monitor or TV. We can attach a standard keyboard and mouse and use it as a full-blown desktop computer to do everyday tasks, such Internet browsing, playing videos/games, word processing and spreadsheet making and a lot more. It has been mainly developed for teaching Computer science in schools. Nowadays, Raspberry Pi is widely being used in colleges, small-medium organizations and institutes to teach coding. If you own a Raspberry Pi device, you might want to check out a bash script named **“PiShrink”** , which is used to make Raspberry Pi Images smaller. PiShrink will automatically shrink a pi image that will then resize to the max size of the SD card on boot. This will make putting the image back onto the SD card faster and the shrunk images will compress better. This can be useful to fit the large size images in your SD card. In this brief guide, we are going to learn to shrink Raspberry images to smaller size in Unix-like systems.
### Installing PiShrink
To install PiShrink on your Linux box, first download the latest version using command:
Next, make the downloaded PiShrink binary as executable:
```
$ chmod +x pishrink.sh
```
Finally, move it your path:
```
$ sudo mv pishrink.sh /usr/local/bin/
```
### Make Raspberry Pi Images Smaller
As you may already know, **Raspbian** is the official operating system for all models of Raspberry Pi. The Raspberry foundation has developed **Raspberry Pi Desktop** version for PC and Mac. You can create a live cd, run it in virtual machine and even install it in your desktop as well. There are also few unofficial OS images available for Raspberry Pi. For the purpose of testing, I’ve downloaded the official Raspbian OS from the [**official download page**][2].
Unzip the downloaded OS image:
```
$ unzip 2019-04-08-raspbian-stretch-lite.zip
```
The above command will extract contents of **2019-04-08-raspbian-stretch-lite.zip** file in the current working directory.
Let check the actual size of the extracted file:
```
$ du -h 2019-04-08-raspbian-stretch-lite.img
1.7G 2019-04-08-raspbian-stretch-lite.img
```
As you can see, the size of the extracted Raspberry OS img file is **1.7G**.
Now, shrink this file’s size using PiShrink like below:
This will create a copy of source img file (i.e 2019-04-08-raspbian-stretch-lite.img) into a new img file (newpi.img) and work on it. For more details, check the official GitHub page given at the end.
And, that’s all for now. Hope this was useful. More good stuffs to come. Stay tuned!