1. 安装ssh server

sudo apt-get install openssh-server

  1. 修改端口

vim /etc/ssh/sshd_config

port 22

3.允许ROOT登录
vim /etc/ssh/sshd_config

PermitRootLogin yes
PermitEmptyPasswords no

4.重启ssh守护进程

sudo service ssh restart

 首先查看一下自己的系统时间: date -R

  1. 运行 tzselect

输入命令后,按提示选择。
在这里我们选择亚洲 (Asia),确认之后选择中国(China),最后选择北京(Beijing)
  

  1. 复制配置文件到/etc目录下

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  
完成东八区北京时间设置。
  
再次查看系统时间,系统时间已更新完成。

备注:

  1)修改系统时间相关的命令:

  sudo date -s MM/DD/YY     //修改日期
  sudo date -s hh:mm:ss     //修改时间

  2)在修改时间以后,修改硬件CMOS的时间
  sudo hwclock --systohc     //非常重要,如果没有这一步的话,后面时间还是不准

sudo vim /etc/apt/sources.list

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 dist-upgrade