zoukankan      html  css  js  c++  java
  • [linux]ubuntu修改镜像源

    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 检查是否有损坏的依赖
    

     修改镜像

    选择合适的镜像源。

    推荐:https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

    Ubuntu 的软件源配置文件是 /etc/apt/sources.list。将系统自带的该文件做个备份,将该文件替换为下面内容,即可使用 TUNA 的软件源镜像。

    # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
    deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
    
    # 预发布软件源,不建议启用
    # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
    # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
    

      

  • 相关阅读:
    Educational Codeforces Round 10 C. Foe Pairs 水题
    Educational Codeforces Round 10 B. z-sort 构造
    CDOJ 1048 Bob's vector 三分
    Educational Codeforces Round 10 A. Gabriel and Caterpillar 模拟
    第14届电子科大初赛民间盗版部分题目题解
    HDU 5654 xiaoxin and his watermelon candy 离线树状数组 区间不同数的个数
    HDU 5653 Bomber Man wants to bomb an Array. dp
    HDU 5652 India and China Origins 二分+并查集
    HDU 5651 xiaoxin juju needs help 数学
    HDU 5650 so easy 数学
  • 原文地址:https://www.cnblogs.com/faithfu/p/11686624.html
Copyright © 2011-2022 走看看