DietPi Is A Lightweight, Optimized OS For Your Raspberry Pi That Can Give You A Performance Boost

As the most prominent SBC lineup, the Raspberry Pi family is compatible with a battalion of operating systems. Full-fledged desktop distros such as Kali Linux, Ubuntu, Debian, and the all-powerful … Read more

Taylor Bell

Taylor Bell

Published on Jul 21, 2024

DietPi Is A Lightweight, Optimized OS For Your Raspberry Pi That Can Give You A Performance Boost

As the most prominent SBC lineup, the Raspberry Pi family is compatible with a battalion of operating systems. Full-fledged desktop distros such as Kali Linux, Ubuntu, Debian, and the all-powerful Raspberry Pi OS provide a highly versatile experience. Alternatively, you could go for RetroPie, LibreElec, OpenMediaVault, or HomeAssistant if you want to devote your credit-card-sized board to a specific project.

Best single board computer

Related

Best single board computer in 2024

If you’ve been thinking of tinkering with a SBC, we break down the most common ones and why you’d want them.

However, there’s another amazing option that’s worth checking out if you’re tired of unresponsive and slow operating systems. I’m talking about DietPi, an ultra-fast distro with enough features to make it a solid recommendation for newcomers as well as SBC experts.

What is DietPi?

And why should you look into it?

The DietPi CLI

Based on Debian, DietPi is an extremely lightweight OS designed for a wide array of SBCs and low-powered computing devices. Much like the Ubuntu Server and Raspberry Pi OS Lite, DietPi features a command-line user interface. But what separates it from its rivals is that most DietPi images have a download size of less than 200MB, with the image size maxing out at just over 1.02GB. Meanwhile, other SBC operating systems have at least double the download and image sizes of DietPi. Therefore, you can easily get DietPi up and running on a 4GB microSD card, assuming you don’t plan to go overboard with the apps.

What’s more, DietPi consumes far less RAM, storage, and CPU resources than many other popular distributions, making it the perfect companion for outdated and low-power Raspberry Pi models. The OS also packs several other features, including automated installation via config file tweaks, multiple logging methods, and easy backup provisions, making it more enticing for beginners to kick-start their journey into the world of CLI distros with DietPi.

How to install DietPi on your Raspberry Pi?

Flashing the microSD card

With the theory portion out of the way, it’s time to set up the OS on your Raspberry Pi. We’ll use Balena Etcher to write the DietPi files onto the microSD card, but you can use just about any image-flashing tool.

  1. Download the portable version of Balena Etcher from the official website before running the .exe file with administrator privileges.
  2. Head to DietPi’s website and download the version of the OS that’s compatible with your Raspberry Pi model.

    For those using a Raspberry Pi 5, it’s worth noting that DietPi is still in its testing phase. As such, you might not be able to access the overclocking-related settings and other functionalities using the DietPi scripts.

  3. Click on Flash from fileselect the DietPi image you just downloaded, and tap Open.
    Selecting the DietPi image in Balena Etcher

  4. Press the Select Target button, pick the microSD card where you wish to install the OS, and hit Select.
    Selecting the microSD card in Balena Etcher

  5. Tap Flash and wait for Balena Etcher to finish flashing the microSD card.
    Pressing the Flash button in Balena Etcher

Configuring DietPi on the Raspberry Pi

Once Balena Etcher has worked its magic on the microSD card, you can unplug it from your system and insert it into the Raspberry Pi to start calibrating the DietPi settings.

  1. Enter root as the username and dietpi as the password when the OS prompts you to enter the credentials.
    Entering the username and password in DietPi

  2. Pick the model of your keyboard. If you’re unable to find your specific model, pick the Generic option with the same number of keys as your keyboard.
    Picking the Keyboard model in the DietPi installation wizard

    Be sure to hit Enter after each step.

  3. Select the Keyboard Layout you’re familiar with.
    Picking the Keyboard configuration in the DietPi installation wizard

  4. Go with the Default options when prompted to choose the AltGr and Composekeys.
    Picking the default option in the AltGr section of the DietPi installation wizard

  5. If you want more security, feel free to change the Global password.
    Setting the global password in the DietPi installation wizard

  6. Likewise, agree to set different passwords for the root and dietpi users for an added layer of protection.
    Setting different passwords for the root and dietpi users in the DietPi installation wizard

  7. If you’re on a low-end device, you can disable the serial/UART console to save some system resources.
    The serial/UART console in the DietPi installation wizard

    Otherwise, there’s no harm in leaving it enabled.

  8. Finally, hit the Install button to wrap up the installation procedure.
    The Install button highlighted in the DietPi installation wizard

Installing other useful facilities on DietPi

A person holding a Raspberry Pi 5 in front of a monitor displaying the DietPi LXDE desktop environment

If you followed all the steps correctly, the default DietPi command-line UI will appear, and you can start building your favorite projects right away. I’d recommend establishing an SSH connection to the DietPi-powered Raspberry Pi, as it’ll let you access the terminal straight from your PC. We have an in-depth guide on connecting to the SBC via SSH, but DietPi simplifies the whole process. All you have to do is install an SSH client (like PuTTY) on your PC and enter the IP address of your Raspberry Pi before logging in with the credentials.

Additionally, if you’re not fond of the CLI-based layout of DietPi, the OS lets you switch between multiple desktop environments. To do so, browse the app catalog of the OS by running the dietpi-software command and select your favorite desktop environment using the Spacebar key before pressing Install.

That said, since most developers and tinkering enthusiasts use Raspberry Pi OS instead of DietPi, it might be worth staying on the former if you want to replicate their projects on your RPi without running into issues. But for those who’re willing to troubleshoot the occasional error or two, you’ll have a blast with DietPi.

A Raspberry Pi 5 held in front of a PC

Related

A beginner’s guide to programming the Raspberry Pi

Unsure about what you should do after buying your first Raspberry Pi? Check out our in-depth tutorial to familiarize yourself with the SBC.

.

Partager cet article

Inscrivez-vous à notre newsletter