Debian 安装源配置

所有的Linux安装完后第一件事,就是要更新安装源

安装源是什么呢,安装源又称软件源,是指把软件的安装源地址放在一个pool里面,用一条命令(比如apt-get install XXX)就可以按照顺序从源内指定的服务器查询下载并进行更新或安装

源列表文件通常在/etc/apt/sources.list,里面记录了你所用的源服务器地址

0x01 首先我们需要获取root用户,切换权限

su
# 输入你的root账户密码,这里光标不会有显示是否输入,按就完了,注意小键盘及大小写

0x02 切换到root账户后

vi etc\apt\source.list
# vim打开安装源列表文件并进行相应编辑

0x03 vim编辑

  1. 方向键移动光标,按i进入插入模式

    注:命令模式下dd为删除本行,x为删除当前字符,输入模式下方向键及delete、backspace均失效。按ESC可退出输入模式,如对当前输入不满意,想要重新输入可以进入命令模式下输入q!。再次进入list文件修改时,会有提示,不要按enter进入继续编辑,按其他任意键,丢弃上次编辑结果以重新进行编辑

  2. 将下列复制并替换到list文件内,终端内粘贴快捷键为Ctrl+Shift+V。

  3. 光盘文件源于源代码已经注释掉了,如有需要删除前方#即可。注意下列源内包括两种不同的Debian发行版,可注释掉不需要的版本。

  4. 修改完成后,进入命令模式,输入:wq!即可(注意:!)

#
# deb cdrom:[Debian GNU/Linux 10.3.0 _Buster_ - Official amd64 DVD Binary-1 20200208-12:08]/ buster contrib main
# deb cdrom:[Debian GNU/Linux 10.3.0 _Buster_ - Official amd64 DVD Binary-1 20200208-12:08]/ buster contrib main
# deb http://deb.debian.org/debian/ buster main
# deb-src http://deb.debian.org/debian/ buster main
# deb http://security.debian.org/debian-security buster/updates main contrib
# deb-src http://security.debian.org/debian-security buster/updates main contrib
# buster-updates, previously known as 'volatile'
# deb http://deb.debian.org/debian/ buster-updates main contrib
# deb-src http://deb.debian.org/debian/ buster-updates main contrib
deb http://httpredir.debian.org/debian/ jessie main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stable main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian stable main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian stable-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
# deb-src http://mirrors.ustc.edu.cn/debian stable-proposed-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free

0x04 更新软件源

注意上面的源内包括两种不同的Debian发行版,注释掉不需要的版本,否则这里会有冲突报错,如不在意报错可不注释,目前未发现影响,后续如发现将进行补充,当然大佬们也可以提前帮助指正

sudo apt-get update
sudo apt-get upgrade

等待跑完即可

【Debian】 Debian 安装源配置的更多相关文章

  1. Debian 入门安装与配置2

    Debian 入门安装与配置2 1. C/C++开发必装软件 atp-get install gcc    这个不用说,用来编译C程序 apt-get install g++ 用来编译C++程序 ap ...

  2. Debian 入门安装与配置1

    Debian 入门安装与配置1 最近安装了多个发行版本的Linux,包括Ubuntu.Fedora.Centos和Debian,发现只有Debian在界面和稳定性等综合特性上表现最优,自己也最喜欢,所 ...

  3. FreeBSD从零开始---安装后配置(一)

    一.安装后配置   上次我们说到FreeBSD的安装,这次我们说FreeBSD安装后的配置和简单优化方法.   安装完BSD只是服务器提供服务这条万里长征路的开始,还需要一些基本的设定和优化.不过实际 ...

  4. 【问题】Debian安装、配置sources.list、安装VMware Tools

    Debian安装: 我采用的是纯命令行安装方式.具体安装过程网上一大堆,不介绍了.需要强调一点,那个SSH Server必须选,否则像XShell这样的客户端不能访问Debian. 配置sources ...

  5. Debian普通用户获取root权限|sudo的安装与配置

    Debian系统的普通用户需要安装软件时,往往会收到“Permission denied”的提示,这时候需要root权限.那么如何在不登陆超级管理员账户的前提下拥有root权限呢?对于大多数Linux ...

  6. Debian 8下vsftpd安装与配置

    Debian 8下vsftpd安装与配置 0.环境 root@remote:/# uname -r 3.16.0-4-amd64 root@remote:/e# lsb_release No LSB ...

  7. Debian 9 源配置

    Debian 9: deb http://mirrors.163.com/debian/ stretch main non-free contrib deb http://mirrors.163.co ...

  8. 【转载】Debian 6安装小记

    转载自:http://unix-cd.com/vc/www/22/2011-06/18022.html 今天终于装上了 debian6,代号叫squeeze是吧?前几天的时候在Microhu’s Bl ...

  9. Debian添加软件源

    安装完渗透测试系统kali linux后,默认的只有security这个源,只更新那些集成的安全软件,不能安装其他新软件,官网给出了3类源: Kali Linux提供了3类软件源,这些源在世界各地都有 ...

随机推荐

  1. CF825G Tree Queries

    [题意] 一棵树有 n个节点,初始均为白色,有两种操作: 1. 1 x 代表把结点 x 设置为黑色 2. 2 x 代表查询 x 到树上任意一个黑色结点的简单路径上的编号最小的结点的编号 输入 t 和 ...

  2. Map2Shp软件字符编码解决方案——彻底杜绝Shape格式乱码

    在使用Shape文件时,如果里面有中文属性信息时,经常会遇到属性信息变为乱码.尤其是ArcGIS10.2.1之后,Esri改变了软件的默认字符编码规则,打开之前保存的Shapefile文件,总会不时遇 ...

  3. Scala实践9

    1.特征 Traits用于在类之间共享接口和字段.它们类似于Java 8的接口.类和对象可以扩展特征,但是特征不能被实例化,因此没有参数. 定义一个特征 最小特征只是关键字trait和标识符: tra ...

  4. 搭建自己的Online Judge

    前言 很多人对于做题有点厌烦,但是,如果让你出题给别人做那么可能会很有意思.可是,出题只能出在一些别人的OJ上,甚至只能在自己的Word文档里出.今天我教大家一个厉害点的,叫做搭建自己的Online ...

  5. springcloud初次zuul超时报错com.netflix.zuul.exception.ZuulException:Forwarding error

    报错如下 com.netflix.zuul.exception.ZuulException:Forwarding error Caused by: com.netflix.hystrix.except ...

  6. Redis(六):list/lpush/lrange/lpop 命令源码解析

    上一篇讲了hash数据类型的相关实现方法,没有茅塞顿开也至少知道redis如何搞事情的了吧. 本篇咱们继续来看redis中的数据类型的实现: list 相关操作实现. 同样,我们以使用者的角度,开始理 ...

  7. python接口自动化测试 - configparser配置文件解析器详细使用

    configparser简介 ConfigParser模块已在Python 3中重命名为configparser 该模块定义了ConfigParser类. ConfigParser类实现一种基本的配置 ...

  8. c#数字图像处理(三)灰度直方图

    灰度直方图是灰度的函数,描述的是图像中具有该灰度级的像素的个数.如果用直角坐标系来表示,则它的横坐标是灰度级,纵坐标是该灰度出现的概率(像素的个数). using System; using Syst ...

  9. selenium,滚到页面底部的方法

    你可以用 execute_script方法来处理这个. 调用原生javascript的API,这样你想滚到哪里就能滚到哪里.   下面的代码演示了如何滚到页面的最下面:   driver.execut ...

  10. NOde.js的安装和简介

    1.nodejs的安装 1.1 检测nodejs的版本 node -v (version:版本) 1.2 path配置nodejs 的环境变量(当前版本都是自动安装配置环境变量)指令: path 1. ...