Raspberry Pi tips and tricks
These are the things that make life with a Raspberry Pi easier, from power and cooling to handy commands.
1. A good power supply is half the battle
A Pi 4 requires 5 V and 3 A (15 watts), a Pi 5 requires 5 V and 5 A (27 watts) with USB-C. A power supply that’s too weak causes random errors, freezes, and corrupted files. Check if there has been a power shortage:
vcgencmd get_throttled
The result throttled=0x0 is good. Anything else means the Pi has had too little power or too much heat.
2. Keep it cool
A Pi that gets too hot will slow down. Measure the temperature:
vcgencmd measure_temp
Keep it below 70 degrees under load. A heatsink or fan (for a Pi 5, the official cooler) and a case with airflow help.
3. Efficient and reliable storage
- An SD card wears out with heavy writing. Use a good card, or better yet a USB SSD. See memory and storage.
- Keep a backup of your card. You can copy the entire card to a file from another computer (replace
/dev/sdXwith your card, and check carefully):sudo dd if=/dev/sdX of=pi-backup.img bs=4M status=progressThen save a copy of the file. For your data itself, use restic or rsync.
4. Handy commands
hostname -I # IP addresses of the Pi
uptime # how long has it been running
free -h # memory usage
df -h # disk usage
vcgencmd measure_temp # temperature
pinout # GPIO pin diagram (in Raspberry Pi OS)
sudo raspi-config # settings
sudo reboot # restart
sudo shutdown -h now # shut down cleanly
Always shut down the Pi cleanly before unplugging it, to prevent damage to the card.
5. Working without a screen
With SSH you don’t need a screen. Do you still want to see the desktop of a Pi from another computer? Raspberry Pi Connect is the official way for remote access, without opening ports. Never just open ports to the internet; use a VPN like WireGuard or Tailscale instead. See the port list.
6. Connecting electronics
The Pi has 40 pins for sensors, LEDs, and motors. Keep in mind the 3.3 volt logic and never connect 5 volts to a GPIO pin. View the pins in our GPIO pinout, calculate the resistor for an LED with the LED resistor tool, and read color bands with the resistor color code. Enable I2C and SPI first in raspi-config.
7. Know what it costs
A Raspberry Pi uses 3 to 6 watts at idle, so about 8 to 16 euros per year at 30 cents per kWh. Calculate it yourself with the power cost calculator.
8. Let your network know it’s there
- Give it a name you can remember (hostname) and a fixed IP address.
- Use Docker to keep programs neatly separated and easy to update.
- Set up monitoring on your Pi with Uptime Kuma (see handy Docker programs).