如果是刚安装的ubuntu,root不能直接登入需要改密码
1. 改root密码
sudo passwd root
2. 刚安装的需要更新源列表
apt-get update
apt-get upgrade
3. 安装vim 编辑器
apt-get install vim
1. 备份源
cp /etc/apt/sources.list ./sources
2. 更新源
gedit /etc/apt/sources.list ;选择下面其中一个源进行替换(推荐清华源)
apt-get update ;替换后记得更新源列表
#阿里云
deb http://mirrors.aliyun.com/ubuntu/ groovy main universe restricted multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ groovy main universe restricted multiverse #Added by software-properties
deb http://security.ubuntu.com/ubuntu/ groovy-security main universe restricted multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ groovy-security main universe restricted multiverse #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ groovy-updates main universe restricted multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ groovy-updates main universe restricted multiverse #Added by software-properties
#ubuntu中国官方镜像源
deb http://cn.archive.ubuntu.com/ubuntu/ groovy main universe restricted multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ groovy main universe restricted multiverse #Added by software-properties
deb http://security.ubuntu.com/ubuntu/ groovy-security main universe restricted multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ groovy-security main universe restricted multiverse #Added by software-properties
deb http://cn.archive.ubuntu.com/ubuntu/ groovy-updates main universe restricted multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ groovy-updates main universe restricted multiverse #Added by software-properties
#清华源 ( https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ )
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ groovy main universe restricted multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ groovy main universe restricted multiverse #Added by software-properties
deb http://security.ubuntu.com/ubuntu/ groovy-security main universe restricted multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ groovy-security main universe restricted multiverse #Added by software-properties
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ groovy-updates main universe restricted multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ groovy-updates main universe restricted multiverse #Added by software-properties
1. 选择Settings
2.
3.
5.
6.
7.
8.
9.
10.
11.
12. 重新登陆
1. 打开终端运行命令
sudo vim /etc/pam.d/gdm-autologin
2. 注释行
auth requied pam_succeed_if.so user != root quiet success
3. 运行命令
sudo vim /etc/pam.d/gdm-password
4. 注释行
auth requied pam_succeed_if.so user != root quiet success
5. 运行命令
sudo vim /root/.profile
6. 在 mesg n 2> /dev/null || true 前面添加 tty -s &&