1. 为系统设置密码:sudo passwd root,根据提示输入命令 2. 编辑文件/etc/lightdm/lightdm.conf文件(若没有该文件,可自行创建一个),更改autologin-user=root,如下图所示: Ps:在Ubuntu1604下,需要进行以下设置,否则启动报错。 修改/root/.profile,注释掉mesg n || true,并且新添加一行:tty -s && mesg n