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.comhttp://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

相关文章
|
4月前
|
Ubuntu Linux
Centos 7、Debian、Ubuntu中tree指令的检查与下载
Centos 7、Debian、Ubuntu中tree指令的检查与下载
|
6月前
|
Ubuntu Linux Docker
[笔记]Centos/Ubuntu/Windows/Docker 安装使用Aria2及Aria2基本使用
[笔记]Centos/Ubuntu/Windows/Docker 安装使用Aria2及Aria2基本使用
231 0
|
Ubuntu
Ubuntu 20.04 安装 Fira Code 字体
Ubuntu 20.04 安装 Fira Code 字体
759 0
|
4月前
|
Ubuntu Linux 数据安全/隐私保护
vm安装Ubuntu以及Ubuntu设置中文
vm安装Ubuntu以及Ubuntu设置中文
103 0
|
6月前
|
Ubuntu 数据安全/隐私保护
Ubuntu中删除LibreOffice方法
删除LibreOffice套件 1、打开终端。您可以使用快捷键Ctrl + Alt + T来打开终端。 2、输入以下命令以卸载LibreOffice套件: sudo apt-get remove libreoffice* 删除所有与LibreOffice相关的软件包 1、系统可能会要求您输入管理员密码。输入密码后,按下Enter键继续。 2、终端会列出要删除的软件包,并要求您确认操作。按下Y键,然后按下Enter键继续。 3、完成卸载后,您可以输入以下命令来删除与LibreOffice相关的配置文件: sudo apt-get purge libreoffice* 删除与LibreOffice
81 1
|
9月前
|
Ubuntu C++
VS code for Ubuntu 16.04安装
VS code for Ubuntu 16.04安装
71 0
|
Ubuntu C++
杂七杂八之Ubuntu-16.04安装 vs code
杂七杂八之Ubuntu-16.04安装 vs code
杂七杂八之Ubuntu-16.04安装 vs code
|
Ubuntu
Ubuntu find 命令
Ubuntu find 命令
122 0
Ubuntu16.04安装VS code图文教程
Ubuntu16.04安装VS code图文教程
Ubuntu16.04安装VS code图文教程