Skip to content

DietPi

DietPi is used on my Raspberry Pi 1 and Raspberry Pi Zero W

🛠 Installation

  1. Download the image from DietPi website.
  2. Identify the SD card device using lsblk.

    lsblk
    
  3. Write the image to the SD card. Replace image.img.xz with the path to your downloaded image and /dev/sdX with the device identifier of your SD card.

xzcat image.img.xz | dd of=/dev/sdX status=progress
xzcat image.img.xz | sudo dd of=/dev/sdX status=progress
  1. Mount the boot partition (e.g., /dev/sdX1) and edit the configuration files.

/boot/dietpi.txt

AUTO_SETUP_NET_WIFI_ENABLED=1

/boot/dietpi-wifi.txt

aWIFI_SSID[0]='MyWifiName'
aWIFI_KEY[0]='MySecretPassword'

⚙ Config

Add user
adduser nicholas
usermod -aG sudo nicholas
su nicholas

Enable Secure Copy Protocol (SCP)

These packages are installed to enable Secure Copy Protocol (SCP), allowing secure file transfers to and from the device. This is useful for managing files remotely.

Enable SCP
sudo apt install openssh-client openssh-sftp-server

Disable DietPi Banner

The DietPi banner displays system information upon login. To disable it and show only a standard login prompt, create a .hushlogin file in the user's home directory.

Disable Banner
touch ~/.hushlogin
Configure Banner
dietpi-banner
Config DietPi
dietpi-config

Change Hostname

To change the hostname of your DietPi device, run dietpi-config, navigate to '2 Network Options' -> 'Hostname', and enter your desired hostname.

Change Hostname
dietpi-config
Resize
dietpi-drive_manager

📝 Usage

🚀 Upgrade

dietpi-update

🔗 References