linux如何更换源为阿里云的源及更换为固定ip

一.linux更换阿里云源

  1. 输入命令

vim /etc/apt/sources.list

  1. 复制下列命令更换sources.list的内容

deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

3.输入wq保存配置退出即可更换

二、linux网络如何更换为静态ip地址

vim /etc/netplan/xx.yaml

ip写入如下

然后 重启net服务 netplan apply

猜你喜欢

转载自blog.csdn.net/qq_19253847/article/details/129580031
今日推荐