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)是在吸收了前人点 ...
随机推荐
- 关于javascript的单线程和异步的一些问题
关于js单线程和异步方面突然就糊涂了,看别人的文章越看越糊涂,感觉这方面是个坑,跳进去就不好跳出来.再去看,看着看着感觉自己明白了一些东西,也不知道对不对,反正是暂时把自己说服了,这样理解能理解的通, ...
- Java虚拟机8:垃圾收集(GC)-3(垃圾收集算法)
1.垃圾对象的判断 Java堆中存放着几乎所有的对象实例,垃圾收集器对堆中的对象进行回收前,要先确定这些对象是否还有用,判定对象是否为垃圾对象有如下算法: (1):引用计数算法 给对象添加一个引用计数 ...
- SQL进价2:三值逻辑和null
1.SQL中的bool类型的值有三种 普通编程语言里的布尔型只有 true 和 false 两个值,这种逻辑体系被称为二值逻辑.而 SQL 语言里,除此之外还有第三个值 unknown,因此这种逻辑体 ...
- ionic和angularjs的区别?
a.ionic是一个用来开发混合手机应用的,开源的,免费的代码库.可以优化HTML.css和js的性能,构建高效的应用程序,而且还可以用于构建sass和angularJS的优化 b.AngularJS ...
- [XML123] FpML
Wiki Fpml FpML (Financial products Markup Language) is a business information exchange standard base ...
- Sublime插件WakaTime使用
1.安装WakaTime插件 ctrl+shift+p-->输入pi-->回车-->输入wakaTime-->回车(进行安装) 安装好后会显示输入api key的输入栏 (也可 ...
- PAT——1061. 判断题
判断题的评判很简单,本题就要求你写个简单的程序帮助老师判题并统计学生们判断题的得分. 输入格式: 输入在第一行给出两个不超过100的正整数N和M,分别是学生人数和判断题数量.第二行给出M个不超过5的正 ...
- async await循环请求
var sleep = function (item,time) { return new Promise(function (resolve, reject) { setTimeout(functi ...
- mysql-8.0.15允许外网访问
1.进MySQL之后, 2.输入以下语句,进入mysql库: use mysql3.更新域属性,'%'表示允许外部访问: update user set host='%' where user ='r ...
- Flash的swf文件破解
1.准备好flash文件,xxx.swf(后缀为swf),将其重构swf文件为fla源文件. 2.asv软件(5以上版本)的操作 1.点击左上角 文件 --> 打开 --> 运行已准备好的 ...