Ubuntu系统初始化
请您在正式使用前运行如下命令,请严格按照顺序执行(只针对国内机器,国外机器自行判断),一定要开启bbr:
只针对Ubuntu22.04系统
1、更改DNS为8.8.8.8 114.114.114.114
在resolv.conf文件中更新DNS
vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 114.114.114.114
重启网络
sudo netplan apply
2、更换为阿里云源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
vi /etc/apt/sources.list
将里面的全部内容替换为下方内容:
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
同步软件源
sudo apt-get update
3、开启bbr
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
sysctl -p
sysctl net.ipv4.tcp_available_congestion_control
lsmod | grep bbr
重启
reboot
已经是第一篇啦!