zoukankan      html  css  js  c++  java
  • 【Debian学徒记事】 Debian 安装源配置

    Debian 安装源配置

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

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

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

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

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

    0x02 切换到root账户后

    vi etcaptsource.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
    

    等待跑完即可

  • 相关阅读:
    蓝牙音箱的连接和断开
    画一个钟表,陪着我走
    利用MediaSession发送信息到蓝牙音箱
    修改Switch 的颜色
    ViewPager PagerAdapter 的使用
    错误:android.view.InflateException: Binary XML file line #167: Binary XML file line #167: Error inflating class <unknown>
    react-project(一)
    create-react-app重建
    nodeJS连接mysql
    nodeJS问题
  • 原文地址:https://www.cnblogs.com/darkluna/p/12345022.html
Copyright © 2011-2022 走看看