Ubuntu ARM64 换源及快速配置指南

Ubuntu ARM64 换源及快速配置指南(基本Linux命令行代码)
Ubuntu ARM64 换源及快速配置指南

Ubuntu 国内镜像源

清华源阿里云腾讯云华为云网易163
Ubuntu X86 镜像源

Ubuntu ARM 23.04换源

Ubuntu Ports 软件仓库镜像使用帮助

Ubuntu 的软件源配置文件是 /etc/apt/sources.list。将系统自带的该文件做个备份,将该文件替换为下面内容,即可使用选择的软件源镜像。

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ lunar main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ lunar main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ lunar-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ lunar-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ lunar-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ lunar-backports main restricted universe multiverse

# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ lunar-security main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ lunar-security main restricted universe multiverse

deb http://ports.ubuntu.com/ubuntu-ports/ lunar-security main restricted universe multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports/ lunar-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ lunar-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ lunar-proposed main restricted universe multiverse

因镜像站同步有延迟,可能会导致生产环境系统不能及时检查、安装上最新的安全更新,不建议替换 security 源。

Ubuntu 允许root登陆

## 编辑配置文件(任意一行使用vi或者vim):
vi /etc/ssh/sshd_config
vim /etc/ssh/sshd_config
sudo vim /etc/ssh/sshd_config

PermitRootLogin prohibit-password 更改为:PermitRootLogin yes
如果“PermitRootLogin prohibit-password”被注释,则取消注释并更改为PermitRootLogin yes

## 重启ssh服务: 
systemctl restart sshd
sudo systemctl restart sshd
## 检查当前的ssh开启情况:
ps -e |grep ssh
## 如果有sshd,则ssh-server已经启动;若仅有agent,则尚未启动;
开启ssh服务:
/etc/init.d/ssh start
## 若为启动或者希望重启ssh,则修改配置并重启ssh服务:
vi /etc/ssh/sshd_config
## 则可以看到配置文件,按照需求修改即可;
重启ssh:
/etc/init.d/ssh restart
sudo /etc/init.d/ssh restart

留下评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注