虚拟机安装Ubuntu后初始化

1.设置中文语言。

这个就在设置里面,添加一个中文语言就好了。设置系统语言之后得重启一次才有效。(当然使用原版英文也很好)

2.设置root密码。

sudo passwd root

3.更换源。(默认使用国外服务器,下载东西会很慢,所以要换成国内的)

(1)由于不同系统版本的镜像的源是不同的,所以第一步使用下面命令查看自己系统版本的codename属性:

lsb_release -a
查看自己系统的属性

(2)Ubuntu 的源存放在在 /etc/apt/ 目录下的 sources.list 文件中,修改前我们先备份,在终端中执行以下命令:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bcakup

(3)然后执行下面的命令打开 sources.list 文件,清空里面的内容,把下面阿里云的 Ubuntu 源复制进去,注意下图要改成自己的codename属性,保存后退出。

#有UI界面使用gedit命令便于操作
sudo gedit /etc/apt/sources.list

#只有命令行界面的使用vi命令
sudo vi /etc/apt/sources.list

源为:

# 阿里云源
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
##測試版源
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
# 源碼
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
##測試版源
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse

把红框中更改为自己系统的codename

(4)接着在终端上执行以下命令更新软件列表,检测出可以更新的软件:

sudo apt-get update

(5)最后在终端上执行以下命令进行软件更新:

sudo apt-get upgrade

4.安装vim

sudo apt install vim

初始化大概就这么多东西,以后有需要得再去慢慢安装其他东西。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容