day2 Ubuntu配置源
1.寻找国内镜像源
https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/
2.配置source list源
sources.list系统自带的,源是来Ubuntu的官网!安装包比较慢,所以最好切换成国内的
python@ubuntu:~$ cd /etc/apt
python@ubuntu:/etc/apt$ sudo cp sources.list sources.list.bak
python@ubuntu:/etc/apt$ vim sources.list
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse # 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
另:阿里云软件源
#我的配置文件源
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted #Added by software-properties # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial multiverse universe #Added by software-properties
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted ## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse restricted universe main #Added by software-properties
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse ## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse restricted universe main #Added by software-properties
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
3. 更新源
python@ubuntu:/etc/apt$ sudo apt-get update
命中: http://mirrors.aliyun.com/ubuntu xenial InRelease
命中: http://mirrors.aliyun.com/ubuntu xenial-updates InRelease
命中: http://mirrors.aliyun.com/ubuntu xenial-backports InRelease
命中: http://mirrors.aliyun.com/ubuntu xenial-security InRelease
正在读取软件包列表... 完成
测试:安装sl包
python@ubuntu:/etc/apt$ sudo apt-get install sl python@ubuntu:/etc/apt$ sl
4.其他 命令
sudo apt-get update 更新源 sudo apt-get install package 安装包 sudo apt-get remove package 删除包 sudo apt-cache search package 搜索软件包 sudo apt-cache show package 获取包的相关信息,如说明、大小、版本等 sudo apt-get install package --reinstall 重新安装包 sudo apt-get -f install 修复安装 sudo apt-get remove package --purge 删除包,包括配置文件等 sudo apt-get build-dep package 安装相关的编译环境 sudo apt-get upgrade 更新已安装的包 sudo apt-get dist-upgrade 升级系统 sudo apt-cache depends package 了解使用该包依赖那些包 sudo apt-cache rdepends package 查看该包被哪些包依赖 sudo apt-get source package 下载该包的源代码 sudo apt-get clean && sudo apt-get autoclean 清理无用的包 sudo apt-get check 检查是否有损坏的依赖
day2 Ubuntu配置源的更多相关文章
- ubuntu 配置apt-get源
ubantu安装软件速度慢一般是因为系统默认选择的源导致,可以通过手动配置源设置解决. 1. 原文件备份 sudo mv /etc/apt/sources.list /etc/apt/sources. ...
- Ubuntu 配置镜像源
Ubuntu 配置镜像源 注, 如果添加镜像后没有自己要安装的软件, 切回原镜像即可, 只是有点慢. cp /etc/apt/sources.list /etc/apt/sources.list.ba ...
- Ubuntu配置国内高速apt-get更新源
Ubuntu配置国内高速apt-get更新源 具体内容直接参考这篇博客:https://www.linuxidc.com/Linux/2017-11/148627.htm 此网站可直接找到符合 ...
- Ubuntu 配置本地源
Ubuntu 配置本地源 操作系统 Ubuntu 20.04.2 LTS 一.挂载 iso 到本地 mount -t iso9660 -o loop /dev/sr0 /media/cdrom //- ...
- Ubuntu配置apt安装源为清华源[含自动配置脚本]
Ubuntu配置apt安装源为清华源[含自动配置脚本] 一.备份原配置文件 Ubuntu 的软件源配置文件是/etc/apt/sources.list.将系统自带的该文件做个备份,以防万一. sudo ...
- Ubuntu配置OpenStack 二:配置时间同步NTP和安装数据库Maridb以及问题总结
继上一节Ubuntu配置OpenStack 一:配置主机环境,下面继续为安装时间同步,以及配置openstack的安装包源和安装数据库Maridb.(全文截图都是由自己徒手搭建完成并且截图) 一.安装 ...
- Ubuntu TensorFlow 源码 Android Demo的编译运行
Ubuntu TensorFlow 源码 Android Demo的编译运行 一. 安装 Android 的SDK和NDK SDK 配置 A:下载 国内下载地址选最新的: SDK: https://d ...
- ubuntu配置小飞机
现在有两种方式在ubuntu配置本地shadowsocks(前提已经在服务器上搭建好了ss) windows,ios和安卓配置都是gui,没什么好说的.然后前期工作什么买vps啊,比较无脑,不想记录这 ...
- Ubuntu 配置安装PCL
Ubuntu 配置安装PCL 之前一直在Mac下开发,现在入手Ubuntu,也借此学习一下Linux下的源码编译安装过程. PCL简介 PCL(Point Cloud Library)是在吸收了前人点 ...
随机推荐
- canvas抛物线运动demo
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...
- mysql5.6 函数大全
# 数学函数(1)ABS(x)返回x的绝对值(2)PI()返回圆周率π,默认显示6位小数(3)SQRT(x)返回非负数的x的二次方根(4)MOD(x,y)返回x被y除后的余数(5)CEIL(x).CE ...
- programming-languages学习
programming-languages学习 */--> pre.src {background-color: #292b2e; color: #b2b2b2;} pre.src {backg ...
- 【nodejs】创建第一个应用
我已经安装好了nodejs(采用安装包的方式),并在idea中安装好nodejs插件,具体参考我的随笔: http://www.cnblogs.com/yujihang/p/7011356.html ...
- HTTP 错误 401.0 - Unauthorized 的解决方案
1.安装vs2015后,以前做的项目中Forms身份验证,竟然不能使用了 2.打开当前项目属性,将windows身份验证属性改为启用 3.vs2015生成的mvc项目中,webconfig缺失auth ...
- [转]PowerDesigner使用常见问题锦集
1. 附加:PowerDesigner 的调色板(Palette)快捷工具栏不见了,怎么重新打开,找回来呢 上网搜索了一下”powerdesigner 图形工具栏”,找到了找回PowerDesigne ...
- PHP面试系列 之Linux(四)---- Shell脚本
一.脚本执行方式 1.先赋予权限 chmod +x test.sh; 再直接执行 ./test.sh 2.调用解释器使得脚本执行 3.使用source命令 source test.sh 二.编写基础 ...
- TCP连接三次握手协议,释放连接四次挥手,以及使用 awl伪造mac地址进行多线程syn洪泛攻击。
这个TCP连接就是一次追女生-谈恋爱-分手,追求比分手简单,但是分手比追求复杂.哥,谈了半年的女朋友,在就快要成功了的时候分了,原因是因为有人在后面该老子背后搞SYN洪泛攻击,最后女朋友丢失了.学会T ...
- 字符型设备驱动程序-first-printf以及点亮LED灯(三)
根据 字符型设备驱动程序-first-printf以及点亮LED灯(二) 学习 修改函数 中的printf 为 printk. #include <linux/module.h> /* ...
- 跟我一起学Linux-线程创建,类似FreeRTOS创建任务
1.参考学习大神网址:http://blog.csdn.net/ithomer/article/details/6063067 #include<stdio.h> #include< ...