操作系统有很多 本人经常使用的都是centos的操作系统 今天来学习一下ubuntu系统 官网https://ubuntu.com
cat /proc/version
uname -a
lsb_release -a
lscpu
默认创建的时候是ubuntu用户,但是是普通用户的权限 登陆终端之后设置root密码
ubuntu@VM-8-8-ubuntu:~$ sudo passwd root
#输入两次密码
现在只能说你能切换到root用户了 但是现在还不能通过root用户进行登陆
root@VM-8-8-ubuntu:~# vim /etc/ssh/sshd_config
删除注释 并且如下进行修改
33 PermitRootLogin yes
34 StrictModes no
57 PasswordAuthentication yes
58 PermitEmptyPasswords yes
系统重启
reboot
即可直接使用root账户进行ssh登陆