ubuntu通过MobaXterm或者xshell连接更换源
1、在ubuntu服务器上面运行sudo passwd root,输入密码,然后su root可以切换到root用户。
2、在windows客户端上面安装xshell或者MobaXterm,连接上ubuntu服务器。
MobaXterm21.2.zip - 蓝奏云 https://lanxh.lanzoup.com/igNLYy3111a
3、通过windows上面的MobaXterm或者xshell换源:
(7条消息) Ubuntu快速更换源_Lanyan9的博客-CSDN博客_ubuntu更换源 https://blog.csdn.net/Lanyan9/article/details/125493390
输入lsb_release -a查勘车Ubuntu代号名称是jammy
输入以下命令备份源列表;
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
再输入命令打开sources.list文件进行修改;
sudo vim /etc/apt/sources.list
按ESC→gg→dG清空所有内容。
按ESC+i进入编辑模式,右击鼠标,粘贴
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
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
按ESC→:x保存退出。
更新源列表
输入sudo apt-get update命令更新源列表。