passwd修改默认密码,防止被爆破
echo root:密码 |sudo chpasswd root
apt-get update && apt-get upgrade -y
安装必要软件依赖
apt update -y && apt install -y curl && apt install -y wget && apt install -y git && apt install sudo -y
apt install ffmpeg default-jdk git wget nano vim htop locate p7zip p7zip-full unzip
BBR开启(提速必备)
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
sysctl -n net.ipv4.tcp_congestion_control
lsmod | grep bbr
更换软件源
sudo tee /etc/apt/sources.list <<-'EOF'
deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free non-free-firmware
# deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free non-free-firmware
deb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free non-free-firmware
# deb-src http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free non-free-firmware
deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free non-free-firmware
# deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free non-free-firmware
# deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
# deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
EOF
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
配置基础软件包
sudo apt install vim wget curl htop git proxychains4 screenfetch tmux bash-completion fcitx5-rime chromium fcitx5 zsh fonts-powerline fzf net-tools openssh-server firewalld bat
加入sudo用户组:
su
apt-get install sudo
/usr/sbin/usermod -a -G sudo $(echo $USER)
1