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. Oracle索引大全

    文档结构如下: 前言: Oracle 官方文档对索引的描述真是弱透了,对索引的说明就是一坨……,support也没有很好的资料,下面还是用的官方上的内容经过自己的整理加上网上的资料. 索引类型: 索引 ...

  2. 递推预处理 + Manacher

    链接:https://www.nowcoder.com/acm/contest/131/D来源:牛客网 字符串 S 只包含小写英文字母.有四种操作,每次操作你可以选择其中一种: 删除字符串的第一个字母 ...

  3. 定时器之Quart.net(2)

    第一步:Install-Package Quartz namespace ProjectEdb { class Program { static void Main(string[] args) { ...

  4. 01-web自动化基础篇

    1.搭建环境 需要的环境 浏览器(Firefox/Chrome/IE…)-----选择Chrome Python Selenium Selenium IDE(如果用Firefox) FireBug.F ...

  5. Gitlab应用——开发人员fetch分支,合并到master主分支申请

    创建开发仓库 打开git Bash,删除之前root管理创建的仓库目录 rm -rf  admin-test 选择项目进行拷贝 ​ 克隆 # git -c http.sslVerify=false c ...

  6. 【WPF学习】第十七章 键盘输入

    当用户按下键盘上的一个键时,就会发生一系列事件.下表根据他们的发生顺序列出了这些事件: 表 所有元素的键盘事件(按顺序) 键盘处理永远不会像上面看到的这么简单.一些控件可能会挂起这些事件中的某些事件, ...

  7. 「 从0到1学习微服务SpringCloud 」02 Eureka服务注册与发现

    系列文章(更新ing): 「 从0到1学习微服务SpringCloud 」01 一起来学呀! Spring Cloud Eureka 基于Netflix Eureka做了二次封装(Spring Clo ...

  8. GitHub学习之路1

    对于代码的管理以及维护上,GitHub不失为一个较为明智的选择.而对于GitHub的灵活应用也是相当重要的,以下记录为以防自己忘记. 1. 创建SSH Key ssh-keygen -t rsa –C ...

  9. MAVEN报错Cannot access alimaven / idea data注解不好使

    BUG 记录 报错页面的代码和截图: Cannot access alimaven (maven.aliyun.com/nexus/conte…..... 解决方法: 报错页面的代码和截图: JAR ...

  10. CSS-12-盒子模型

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...