Ubuntu Tips,


1、Linux中apt与apt-get命令的区别与解释

1.1、source list 文件格式:apt 背后的故事

1.2、查看某个 package 属于 Main,Universe,Restricted 还是 Multiverse。(launchpad)

1 apt policy <package>

2、apt update 与 apt upgrade

1 2 apt update    #更新软件包索引 apt upgrade   #更新所有已安装软件包

3、Ubuntu 16.04 切换国内DNS。

1 2 3 4 cat /etc/resolv.conf    #查看当前dns sudo resolvconf -u             #刷新dns sudo /etc/init.d/networking restart    #刷新dns粗暴版 sudo systemctl restart networking.service    #重启网络的另外一种方式

3.1、针对网卡修改。

1 sudo vim /etc/network/interfaces

内容示例:

1 2 3 4 5 6 7 auto enp2s0 iface enp2s0 inet static address 192.168.0.186 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameserver 223.5.5.5     #阿里dns dns-nameserver 119.29.29.29  #腾讯dns

3.2、其余。

1 2 3 vim sudo vim /etc/resolvconf/resolv.conf.d/base #or vim sudo vim /etc/resolvconf/resolv.conf.d/tail

内容示例:

1 2 nameserver 223.5.5.5     #阿里dns nameserver 119.29.29.29  #腾讯dns

4、配置静态路由。

1 2 route -n    #查看路由 sudo vim /etc/network/interfaces

内容示例

1 2 3 4 5 auto enp2s0 iface enp2s0 inet static       address 192.168.1.2       netmask 255.255.255.0       up route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.0.1 dev enp2s0

5、Ubuntu 官方镜像:http://cdimage.ubuntu.com,http://releases.ubuntu.com。

6、中科大软件源(/etc/apt/sources.list):repository file generator。

6.1、Ubuntu 16.04(xenial)更换软件源:

1 2 3 4 wget https://mirrors.ustc.edu.cn/repogen/conf/ubuntu-http-4-xenial -O sources.list sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak sudo mv sources.list /etc/apt/sources.list sudo apt update

7、ubuntu16.04安装matlab2016b

8、Ubuntu 安装 Wine 1.8与QQ轻聊版

1 2 3 4 sudo add-apt-repository ppa:ubuntu-wine/ppa sudo apt update sudo apt install wine1.8 winetricks # ......


【相关阅读】

1、Linux 用户管理相关命令

2、Linux 系统资源查看


*** walker ***

本文转自walker snapshot博客51CTO博客,原文链接http://blog.51cto.com/walkerqt/1957767如需转载请自行联系原作者


RQSLT

相关内容