Skip to content

Befehle

Alle Befehle hier sind Debian/Ubuntu-basiert. Auf anderen Distros ggf. aptdnf/pacman ersetzen.

Terminal window
adduser <name>
usermod -aG sudo <name>
Terminal window
apt update && apt full-upgrade
apt install <paket>
dpkg-reconfigure -plow unattended-upgrades
Terminal window
ufw default deny incoming
ufw default allow outgoing
ufw allow 22/tcp
ufw allow 80,443/tcp
ufw enable
ufw status
Terminal window
systemctl enable --now <service>
systemctl status <service>
journalctl -u <service> -f
Terminal window
restic -r sftp:user@host:/path init
restic -r <repo> backup /home /etc /var
restic -r <repo> snapshots
restic -r <repo> restore <snapshot-id> --target /restore
Terminal window
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
sudo sshd -t
sudo systemctl restart sshd
Terminal window
sudo systemctl enable --now fail2ban
sudo fail2ban-client status sshd
Terminal window
sudo apt install wireguard
sudo systemctl enable --now wg-quick@wg0
Terminal window
restic -r <repo> forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune
restic -r <repo> check
restic -r <repo> unlock
Terminal window
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker <user>
docker compose up -d
docker compose ps
docker compose logs --tail=20