inux一键dd脚本支持Debian 9/10/11、Ubuntu 16.04/18.04/20.04、CentOS 7/8、RockyLinux 8和AlmaLinux 8系统的网络重装,自动适配境内境外系统源(境内使用阿里云,境外使用官方),适用于 GigsGigsCloud、AkkoCloud、GreenCloud和腾讯云等vps和云服务器。

使用命令:

wget -N --no-check-certificate https://down.vpsaff.net/linux/dd/network-reinstall-os.sh && \
chmod +x network-reinstall-os.sh && ./network-reinstall-os.sh

原文:https://www.idcoffer.com/archives/4870

现在很多云服务或vps都逐渐支持IPv6了,但是由于IPv6路由等原因,体验可能非常不好,需要禁用。

单网卡快速禁用IPv6脚本:

nic=$(ip route get 8.8.8.8 | grep dev | awk -F'dev' '{ print $2 }' | awk '{ print $1 }')
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf \
&& echo "net.ipv6.conf.$nic.disable_ipv6 = 1" >> /etc/sysctl.conf \
&& sysctl -p