下载镜像
传送门,这是使用的是阿里云镜像
安装
一路下一步
配置
1、登录
首先使用在安装过程中设置的用户名和密码登录进去
2、设置root密码
在ubuntu的终端输入sudo passwd root
,对root密码进行设置
下面的操作都是在root用户状态下进行的
修改配置源
1、首先备份下原来的配置文件,以防万一
cp /etc/apt/sources.list /etc/apt/sources.list_backup
2、用自带的gedit编辑器打开sources.list
gedit /etc/apt/sources.list
3、把里面所有的信息删掉或者注释掉,把下面的的代码复制进去,保存一下
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-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports 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
4、更新源
apt-get update
设置远程登录
1、安装openssh客户端及服务端
apt-get install openssh-client
apt-get install openssh-server
2、查看是否服务开启
到此你就可以使用xshell连接ubuntu了
注意:到此无法使用root远程登录
设置root远程登录
使用命令vi /etc/ssh/sshd_config
打开sshd_config文件,添加
PermitRootLogin yes