Raspbian: Difference between revisions
Appearance
m →MQTT |
(No difference)
|
Latest revision as of 17:48, 17 October 2025
Stuff for my Raspi / Raspi3 / Raspi4
basics
default login: pi/raspberry
initial package updates
sudo apt-get update sudo apt-get dist-upgrade sudo apt purge -y cloud-init sudo apt-get autoremove --purge sudo apt-get install vim mc git
raspi-config
sudo raspi-config - Update - Network : set hostname - Interfacing options : Enable SSH - Localization -> change Keyboard Layout - advanced -> disable logging (to reduce SD usage) - Locale -> en.US.UTF-8
for locale issues run
sudo dpkg-reconfigure locales
SSH password-free-login
ssh-copy-id pi@raspi
Static IP
(not used, set via DHCP server FritzBox instead)
sudo nmtui
NTP Enable Time Sync
sudo apt-get install systemd-timesyncd sudo timedatectl status # sudo timedatectl set-ntp true
pi-hole, unbound, log in ram, ...
https://forum.kuketz-blog.de/viewtopic.php?f=53&t=8759
which IPv6 address?
ip a ls |grep fd00
config.txt
Location
Raspbian old:
sudo vim /boot/firmware/config.txt
Raspbian old:
sudo vim /boot/config.txt
Libreelec:
mount -o remount,rw /flash nano /flash/config.txt mount -o remount,ro /flas
Power Saving
see https://blues.io/blog/tips-tricks-optimizing-raspberry-pi-power/
disable Wifi and Bluetooth
[all] # disable wifi dtoverlay=disable-wifi # disable bluetooth dtoverlay=disable-bt
Disable Onboard LEDs
[pi4] # Disable the PWR LED dtparam=pwr_led_trigger=none dtparam=pwr_led_activelow=off # Disable the Activity LED dtparam=act_led_trigger=none dtparam=act_led_activelow=off # Disable ethernet port LEDs dtparam=eth_led0=4 dtparam=eth_led1=4
cmdline.txt
add "quiet" to remove kernel boot messages
sudo vim /boot/firmware/cmdline.txt console=tty1 root=PARTUUID=eedf3243-02 rootfstype=ext4 fsck.repair=yes rootwait quiet cfg80211.ieee80211_regdom=DE
CPU
from https://raspberrypi.stackexchange.com/questions/103653/setting-the-maximum-clock-speed
set powersave at runtime
sudo apt install cpufrequtils sudo cpufreq-set -g powersave
systemctl_Services
see Linux_Bash_Shell_Scripting#systemctl_Services
Install uv
https://docs.astral.sh/uv/getting-started/installation/
# install curl -LsS f https://astral.sh/uv/install.sh | sh # update uv self update
MQTT
sudo apt install mosquitto mosquitto-clients sudo vim /etc/mosquitto/mosquitto.conf per_listener_settings true allow_anonymous false listener 1883 password_file /etc/mosquitto/passwd # see http://www.steves-internet-guide.com/mqtt-username-password-example/ sudo vim /etc/environment PW_MQTT=XXX
Other
grant access to tty to user pi
sudo usermod -a -G tty pi