Java教程

Ubuntu20.10 设置中文,更新源,root界面登入

本文主要是介绍Ubuntu20.10 设置中文,更新源,root界面登入,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

如果是刚安装的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. 重新登陆

root图形界面登入

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 && 

这篇关于Ubuntu20.10 设置中文,更新源,root界面登入的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!