ios6.1.3软件源大全_aptget 软件源文件格式以及ubuntu 18.04更换阿里源

本文探讨了Ubuntu系统中sources.list文件的格式,特别是deb和deb-src的区别。重点讲解了如何配置适合18.04版本的软件源,包括codename、repos_path、section1和section2的选择。通过分析dists目录和pool目录,解释了如何确定section1和section2,并提供了修改Ubuntu 18.04软件源的步骤。
摘要由CSDN通过智能技术生成

前言

由于种种原因,例如下载速度慢、找不到所需应用等,我们经常需要修改debian系统的软件源文件/etc/apt/sources.list,之前一直是直接在网上搜索别人现有的源内容,然后复制粘贴过去···今天,我们来看看这个sources.list究竟是啥子一个格式来的。先通过一个示例文件,分析sources.list各个行的格式,然后依葫芦画瓢,我们尝试编写适合ubuntu18.04的sources.list。

sources.list的格式 探究

输入

cat /etc/apt/sources.list

可以看到类似如下的内容:

deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
···

除了注释##外,核心的语句其实就是两类:

deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty unniverse

其中deb和deb-src的区别在于:

The lines starting with "deb" are binary pack

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值