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
相关推荐
王哲晓1 小时前
Linux通过yum安装Docker
java·linux·docker
OkeyProxy1 小时前
怎麼在Ubuntu上設置全局代理
ubuntu·代理模式·proxy模式·ip代理·海外ip代理
gopher95111 小时前
linux驱动开发-中断子系统
linux·运维·驱动开发
码哝小鱼1 小时前
firewalld封禁IP或IP段
linux·网络
鼠鼠龙年发大财1 小时前
【x**3专享】安装SSH、XFTP、XShell、ARM Linux
linux·arm开发·ssh
nfgo1 小时前
快速体验Linux发行版:DistroSea详解与操作指南
linux·ubuntu·centos
Rookie_explorers2 小时前
Linux下go环境安装、环境配置并执行第一个go程序
linux·运维·golang
weixin_424215842 小时前
shell运算实战案例-KFC点餐系统
linux·centos
小黑爱编程3 小时前
【LInux】HTTPS是如何实现安全传输的
linux·安全·https
BeyondESH3 小时前
Linux线程同步—竞态条件和互斥锁(C语言)
linux·服务器·c++