树莓派+ubuntu-22.04-server+换源

这篇博客介绍了如何在Ubuntu系统中进行源文件备份与修改,使用腾讯云的镜像源,并详细展示了如何更换DNS,设置为114.114.114.114作为首选DNS服务器,以提升系统更新与网络访问速度。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  1. 备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
  1. 改文件
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy main restricted
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-updates main restricted
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy universe
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-updates universe
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy multiverse
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-updates multiverse
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-backports main restricted universe multiverse
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-security main restricted
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-security universe
deb http://mirrors.cloud.tencent.com/ubuntu-ports jammy-security multiverse
  1. 换DNS(很重要)
sudo vim /etc/resolv.conf
# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 114.114.114.114
options edns0 trust-ad
search lan
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值