Software installieren
Debian:
Hilfreiche Software installieren:
apt update \
&& \
apt install -y \
nano \
curl \
htop \
btop \
iputils-ping \
iproute2 \
iptables \
ipset \
ethstatus \
vnstat \
sshfs \
wget \
cifs-utils \
python3 \
python3-venv \
python3-pip \
tmux \
tree \
rsync \
tcpdump \
isc-dhcp-client \
gpg \
ntfs-3g \
util-linux \
parted \
fuse \
dosfstools \
tmux für crontab vorbereiten und auto update vorbereiten:
echo 'set-option -g default-shell /bin/bash' >> ~/.tmux.conf
mkdir manual
echo -e 'apt-get update\napt-get full-upgrade -y\n/sbin/reboot now' >> manual/update_and_reboot.sh
echo -e 'apt-get update\napt-get full-upgrade -y' >> manual/just_update.sh
mini Skript für neu installierte Debian Systeme:
#!/usr/bin/env bash
set -euo pipefail
# 1) /etc/apt/sources.list komplett ersetzen
cat > /etc/apt/sources.list <<'EOF'
deb http://deb.debian.org/debian/ trixie main contrib non-free-firmware non-free
deb http://security.debian.org/debian-security trixie-security main contrib non-free-firmware non-free
deb http://deb.debian.org/debian/ trixie-updates main contrib non-free-firmware non-free
deb http://deb.debian.org/debian trixie-backports main contrib non-free-firmware non-free
EOF
# 2) /etc/resolv.conf komplett ersetzen
cat > /etc/resolv.conf <<'EOF'
nameserver 1.1.1.1
EOF
chattr +i /etc/resolv.conf
apt-get update
apt-get install tmux -y
# 3) tmux Sessions tm0 bis tm12 erstellen (falls nicht vorhanden)
for i in $(seq 0 12); do
if ! tmux has-session -t "tm${i}" 2>/dev/null; then
tmux new-session -d -s "tm${i}"
fi
done
tmux send-keys -t tm0 "cd /root/" C-m
tmux send-keys -t tm0 "apt update \
&& \
apt install -y \
nano \
curl \
htop \
btop \
iputils-ping \
iproute2 \
iptables \
ipset \
ethstatus \
vnstat \
sshfs \
wget \
cifs-utils \
python3 \
python3-venv \
python3-pip \
tmux \
tree \
rsync \
tcpdump \
isc-dhcp-client \
gpg \
ntfs-3g \
util-linux \
parted \
fuse \
dosfstools" C-m