Debian/Ubuntu配置aliyun源和安装工具

Debian 10 的 apt-get 源更换为 aliyun,以提升国内环境 apt install 的速度。

1)备份原 apt-get 源文件

复制代码
root@e3c22f627b9e:~# cd /etc/apt
root@e3c22f627b9e:/etc/apt# cp sources.list sources.list.bak

2)清除原 apt 源文件内容

复制代码
root@e3c22f627b9e:/etc/apt# > sources.list

3)添加 aliyun apt-get 源

复制代码
root@e3c22f627b9e:~# cd /etc/apt
root@e3c22f627b9e:/etc/apt# echo "deb http://mirrors.aliyun.com/debian  stable main contrib non-free" >> sources.list
root@e3c22f627b9e:/etc/apt# echo "deb http://mirrors.aliyun.com/debian  stable-updates main contrib non-free" >> sources.list

4)更新 apt

执行如下命令更新 apt 源

复制代码
root@e3c22f627b9e:/etc/apt# apt update

参考阿里云镜像

复制代码
https://developer.aliyun.com/mirror/debian

阿里云 debian 镜像支持版本

复制代码
http://mirrors.aliyun.com/debian/dists/

5)ps 命令所在的安装包名字为procps

可在Debian/Centos 中使用命令apt-file search /bin/ps | grep -w "/bin/ps" 搜索命令对应安装包的名字

安装

复制代码
apt-get update
apt-get  install  procps

6)Debian/Ubuntu安装ping命令

复制代码
apt-get update 
apt-get install inetutils-ping

7)Centos安装ping 命令

复制代码
yum install iputils

8)Debian/Ubuntu安装telnet命令

复制代码
apt-get update 
apt-get install telnet

9)Debian/Ubuntu、CentOS安装netstat命令

复制代码
# Debian
apt-get install net-tools
# Ubuntu
apt-get install net-tools
# Alpine
apk add net-tools
# Arch Linux
pacman -S net-tools
# Kali Linux
apt-get install net-tools
# CentOS
yum install net-tools
# Fedora
dnf install net-tools
# Raspbian
apt-get install net-tools
相关推荐
wdfk_prog5 小时前
[Linux]学习笔记系列 -- [kernel][time]alarmtimer
linux·笔记·学习
小志biubiu5 小时前
【Linux】Ext系列文件系统
linux·服务器·c语言·经验分享·笔记·ubuntu·操作系统
ha20428941946 小时前
Linux操作系统学习之---基于环形队列的生产者消费者模型(毛坯版)
linux·c++·学习
南林yan8 小时前
Debian、Ubuntu、CentOS:Linux 三大发行版的核心区别
linux·ubuntu·debian·linux内核
st7802069 小时前
Debian 13.1 下编译Openwrt24
运维·debian·openwrt
Wang's Blog10 小时前
Linux小课堂: NGINX反向代理服务器配置与实践
linux·运维·nginx
zhilin_tang10 小时前
对比select和epoll两种多路复用机制
linux·c语言·架构
showker10 小时前
ecstore等产品开启缓存-后台及前台不能登录原因-setcookie+session问题
java·linux·前端
conkl11 小时前
在 CentOS 系统上实现定时执行 Python 邮件发送任务完整指南
linux·运维·开发语言·python·centos·mail·邮箱
江輕木11 小时前
VMware安装配置CentOS 7
linux·运维·centos