树莓派Ubuntu22.04 server换源

备份:

<span class="token function">sudo</span> <span class="token function">cp</span> /etc/apt/sources.list /etc/apt/sources.list.bak

改文件:
————————————————
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
————————————————

换DNS(很重要) sudo vim /etc/resolv.conf ————————————————

  1. This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
  2. Do not edit.
  3. This file might be symlinked as /etc/resolv.conf. If you’re looking at
  4. /etc/resolv.conf and seeing this text, you have followed the symlink.
  5. This is a dynamic resolv.conf file for connecting local clients to the
  6. internal DNS stub resolver of systemd-resolved. This file lists all
  7. configured search domains.
  8. Run “resolvectl status” to see details about the uplink DNS servers
  9. currently in use.
  10. Third party programs should typically not access this file directly, but only
  11. through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
  12. different way, replace this symlink by a static file or a different symlink.
  13. See man:systemd-resolved.service(8) for details about the supported modes of
  14. operation for /etc/resolv.conf.

nameserver 114.114.114.114 options edns0 trust-ad search lan ————————————————

Tagged on: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.