ubuntu apt

ubuntu

apt advanced package tool  安装一个软件所依赖的其他软件会自动下载。

软件源:软件仓库

更换软件源 

cd /etc/apt

备份source.list文件

cp source.list source.list.bak

vi sources.list

deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse

apt-get update

apt-get upgrade 升级apt

apt-get insall xxx

apt-cache search xxx 在软件源上查询是否有xxx软件

apt-get remove xxx

apt-get purge xxx

apt-get update

apt-get upgrade

dpkg -l | grep xxx 查询本机是不是已经安装过xxx软件

用着用着突然发现不能上网了

经过一番折腾发现dns文件空了

---------------------- 下面写的不一定正确,不要参考---开始

通过修改:

sudo vi /etc/resolvconf/resolv.conf.d/base(这个文件默认是空的)

在里面插入:
nameserver 虚拟机所在的主机ip192.168.0.100

如果有多个DNS就一行一个

修改好保存,然后执行

sudo resolvconf -u

再看/etc/resolv.conf,最下面就多了2行:

cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 虚拟机所在的主机ip192.168.0.100

可以看到我们的设置已经加上了,然后再ping一个域名,当时就可以解析了,无需重启。

 --------------------------------------上面写的不一定正确,不要参考---结束

apt-get install ubuntu-desktop 安装桌面程序

概念:

host 宿主机

vm 虚拟机

ubuntu 客户机

在虚拟机的页面上,选择安装虚拟机增强工序

添加共享文件夹

猜你喜欢

转载自peng4602.iteye.com/blog/2363944
今日推荐