这两年身边的朋友一个一个地都开始学编程了,以前从来没有想过自己要去学。今年居然突然对python开始感兴趣了。
利用工作之余跟着猿人学python。https://www.yuanrenxue.com/之我的pyhton笔记。
更改源列表
源列表(sources.list)是Ubuntu的包管理软件apt-get获取软件的网址列表。该列表文件位于: /etc/apt/sources.list。由于Ubuntu官方的源地址在国外,国内访问速度很慢,所以,我们需要改成国内的镜像服务器,这样下载安装软件包的时候就可以很快了。比如,可以使用阿里云的镜像:
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
除了阿里云的镜像,国内还有清华大学镜像、中科大镜像等等,可以根据自己的网络连接情况选择镜像源。
随着 Ubuntu 16.04 LTS 的发布,Ubuntu 的软件包管理命令也发生了变化,新系统采用了 Debian 项目中所使用的 APT(Advanced Package Tool)来完成各种的不同的任务,APT 命令全面取代了我们之前在 Linux 软件包管理基本操作入门中所介绍的 apt-get、apt-cache 等功能。下面是新的apt和旧的apt-get、apt-cache的不同:
Ubuntu 16.04 LTS | 老版本Ubuntu |
---|---|
apt install 包名 | 替代 apt-get install 包名 |
apt remove 包名 | 替代 apt-get remove 包名 |
apt search 包名 | 替代 apt-cache search 包名 |
apt show 包名 | 替代 apt-cache show 包名 |
apt update | 替代 apt-get update |
apt upgrade | 替代 apt-get upgrade |
apt list –installed |
|
apt list –upgradable | apt-get -u upgrade –assume-no |
apt edit-sources |
|
apt autoremove | 替代 apt-get autoremove |
apt purge 包名 | 替代 apt-get purge 包名 |