换源
- 备份原版
sudo cp /etc/apt/sources.list /etc/apt/sources_init.list
- 换源
sudo gedit /etc/apt/sources.list
# 阿里源 (Ubuntu 18.04)
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
- 同步
sudo apt-get update
sudo apt-get -f install
sudo apt-get upgrade
域名解析
gedit /etc/resolv.conf
使用阿里巴巴提供的DNS域名解析
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 223.5.5.5
nameserver 223.6.6.6
远程连接
- 安装ssh
#客户端
sudo apt-get install openssh-client
#服务器
sudo apt-get install openssh-server
- 启动服务
sudo /etc/init.d/ssh start
- 修改配置文件
sudo vim /etc/ssh/sshd_config
找到PermitRootLogin without-password
在其下一行添加PermitRootLogin yes
后重启服务。
service ssh restart