wget 'https://downloads.raspberrypi.org/raspbian_latest' -O ~/'Downloads/raspbian.zip'
wget 'https://downloads.raspberrypi.org/raspbian_lite_latest' -O ~/'Downloads/raspbian-lite.zip'
sudo raspi-config
sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y && sudo apt clean && sync
sudo apt install htop -y && sync
sudo raspi-config
nowrap
and nonewlines
for current userecho -e "set nowrap\nset nonewlines" | tee ~/'.nanorc' > '/dev/null' && cat ~/'.nanorc'
kernel.dmesg_restrict
, kernel.kptr_restrict
, and kernel.sysrq
vm.swappiness
to 10
and vm.vfs_cache_pressure
to 50
echo -e "kernel.dmesg_restrict = 1\nkernel.kptr_restrict = 1\nkernel.sysrq = 1\nvm.swappiness = 10\nvm.vfs_cache_pressure = 50" | sudo tee '/etc/sysctl.d/99-custom.conf' > '/dev/null' && cat '/etc/sysctl.d/99-custom.conf'
sudo -e '/etc/dhcpcd.conf'
interface eth0 static ip_address=192.168.1.158/24 static routers=192.168.1.1 static domain_name_servers=1.1.1.1 1.0.0.1
50MB
sudo mkdir -p '/etc/systemd/journald.conf.d' && echo -e "[Journal]\nSystemMaxUse=50M\nRuntimeMaxUse=50M" | sudo tee '/etc/systemd/journald.conf.d/logging.conf' > '/dev/null' && cat '/etc/systemd/journald.conf.d/logging.conf'
sudo -e '/etc/systemd/system/fstrim.service'
[Unit] Description=Discard unused blocks [Service] Type=oneshot ExecStartPre=/bin/sync ExecStart=/sbin/fstrim -a ExecStartPost=/bin/sync
sudo -e '/etc/systemd/system/fstrim.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'fstrim.timer' && sudo systemctl start 'fstrim.timer' 'fstrim' && sudo systemctl status 'fstrim' -l
[Unit] Description=Discard unused blocks once a week Documentation=man:fstrim [Timer] OnCalendar=weekly AccuracySec=1h Persistent=true [Install] WantedBy=timers.target
sudo systemctl disable 'ssh' && sudo systemctl enable 'ssh.socket'
echo 'export TZ=:/etc/localtime' | sudo tee '/etc/profile.d/tz.sh' > '/dev/null' && cat '/etc/profile.d/tz.sh' | grep -e 'export TZ=:/etc/localtime'
sudo -e '/etc/systemd/system/raspbian-up.service'
[Service] Type=oneshot ExecStartPre='/usr/bin/apt' clean ExecStart='/usr/bin/apt' update ExecStart='/usr/bin/apt' full-upgrade -y ExecStart='/usr/bin/apt' autoremove -y ExecStartPost='/bin/sync' ExecStartPost='/bin/systemctl' reboot
sudo -e '/etc/systemd/system/raspbian-up.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'raspbian-up.timer' --now
[Unit] Description=Software Package Maintenance and Updater After=network-online.target Wants=network-online.target [Timer] OnCalendar=*-*-* 05:40:00 Persistent=true [Install] WantedBy=timers.target
https://dakboard.com/app/screenPredefined?p=c14c5944d8ed6a1433ae43c9e96b07d5