HON’s Wiki # Raspberry Pi
Home / Home Automation
Contents
Using
OS: Raspbian Raspberry Pi OS (latest)
Hardware models: 1B, 3B
Setup
Preparing the SD Card
- Download
Raspbian Raspberry Pi OS: Operating system images (Raspberry Pi)
- If you don’t need a desktop, use “Raspberry Pi OS Lite”.
- Burn it to the SD card.
- Make sure the SD card is RasPi-compatible: SD Cards (Raspberry Pi)
- Linux:
dd if=<img-file> of=<sd-dev> bs=4M conv=fdatasync status=progress
- Windows: Use Win32DiskImager.
- Or use the official Raspberry Pi Imager.
- Mount the SD card in the RasPi and power it on.
Basic Setup (with Desktop Environment)
- Follow the configuration wizard.
- Set a password for the “pi” user.
- Turn off Bluetooth and/or Wi-Fi if not used.
- In “Raspberry Pi Configuration”:
- (Optional) Disable auto login.
- Disable all unused interfaces.
- Fix the keyboard layout.
Basic Setup (without Desktop Environment)
- Default credentials: Username
pi
, password raspberry
.
- Configure through the menu:
sudo raspi-config
- If a black border is present, disable overscan (TODO enable or disable underscan?).
- Set the installed locale and default locale to
en_US.UTF-8
.
- Fix the keyboard layout.
- Enable SSHD.
- Upgrade the system and install stuff:
- Upgrade:
apt update && apt upgrade
- Install basics:
apt install vim htop screen
- Add personal admin user:
- Create user:
adduser <user>
- Add SSH key (from a GitHub user in this case):
cd /home/<user>
mkdir .ssh
curl https://github.com/<user>.keys >> .ssh/authorized_keys
chown -R <user>:<user> .ssh
chmod 700 .ssh
and chmod 600 .ssh/*
- Make user sudoer:
usermod -aG sudo <user>
- Let user see system logs:
usermod -aG systemd-journal <user>
- Try logging into the user locally and through SSH.
- Delete default user:
deluser pi
- Configure SSHD:
PermitRootLogin no
PasswordAuthentication no
#AcceptEnv LANG LC_*
(comment it)
- Restart
sshd
and try to open a new session.
- Remove the MOTD:
> /etc/motd
- Setup firewall:
- TODO
Applications
Raspotify
A Spotify Connect community client.
See dtcooper/raspotify (GitHub).
hon.one
| HON95/wiki
| Edit page