有关ubuntu的若干问题收集汇总

root密码可以通过  sudo passwd root  修改密码
sudo dpkg-reconfigure locales   选择 zh_CN.UTF-8为默认语言为中文   下载中文语言包:sudo apt install language-pack-zh-hans 
更新源:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
先备份
2.编辑源列表文件
命令如下:
sudo vim /etc/apt/sources.list
如果报错:sudo:vim:command not found    说明没装vim编辑器
使用命令:
sudo apt-get install vim 安装即可
 3.查看新版本信息
其实Ubuntu18.04版之前的任一版更改apt源为国内源方法早就有了,内容大同小异,我们应当掌握其规律了,其实每一版内容不同的地方就是版本号(或者官方一点的说:系统代号),所以我们先了解下新版本的系统代号:
使用如下命令:
lsb_release -c
阿里源:
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-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports 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
5.更新软件列表
运行如下命令:
sudo apt-get update
 
6.更新软件包
运行如下命令:
sudo apt-get upgrade
总而言之,update是更新软件列表,upgrade是更新软件。
在线直接安装的命令
sudo apt-get install 软件名称
 
 
posted @ 2020-04-05 16:44  哐当一下  阅读(86)  评论(0)    收藏  举报