前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >debian中科大替换教程

debian中科大替换教程

作者头像
章工运维
发布2023-05-19 17:34:59
6890
发布2023-05-19 17:34:59
举报
文章被收录于专栏:章工运维

警告

操作前请做好相应备份

一般情况下,将 /etc/apt/sources.list 文件中 Debian 默认的源地址 http://deb.debian.org/ (opens new window) 替换为 http://mirrors.ustc.edu.cn (opens new window) 即可。

可以使用如下命令:

sudo sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list

当然也可以直接编辑 /etc/apt/sources.list 文件(需要使用 sudo)。以下是 Debian Stable 参考配置内容:

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

同时你也可能需要更改 Debian Security 源,请参考 Debian Security 源使用帮助

sed -i 's/security.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list

更改完 sources.list 文件后请运行 sudo apt-get update 更新索引以生效。

小技巧

使用 HTTPS 可以有效避免国内运营商的缓存劫持,但需要事先安装 apt-transport-https (Debian Buster 及以上版本不需要)。

# 命令安装

代码语言:javascript
复制
ubuntu 容器安装ping ifconfig ip命令
进入容器测试ifconfig  ping 没有-------->>很尴尬
apt-get install net-tools
###   ifconfig
apt-get install iputils-ping
###  ping
apt-get install iproute2
####  ip
centos安装ping
yum install -y iputils

安装ps命令
apt-get update
apt-get  install  procps
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022-12-15,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • # 命令安装
相关产品与服务
容器服务
腾讯云容器服务(Tencent Kubernetes Engine, TKE)基于原生 kubernetes 提供以容器为核心的、高度可扩展的高性能容器管理服务,覆盖 Serverless、边缘计算、分布式云等多种业务部署场景,业内首创单个集群兼容多种计算节点的容器资源管理模式。同时产品作为云原生 Finops 领先布道者,主导开源项目Crane,全面助力客户实现资源优化、成本控制。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档