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
相关推荐
OliverH-yishuihan6 小时前
在 Windows 上安装 Linux
linux·运维·windows
zclinux_6 小时前
【Linux】虚拟化的内存气泡
linux·运维·服务器
爱潜水的小L6 小时前
自学嵌入式day33,互斥和同步
linux
松涛和鸣6 小时前
DAY33 Linux Thread Synchronization and Mutual Exclusion
linux·运维·服务器·前端·数据结构·哈希算法
A_New_World6 小时前
Linux内核配置、编译、安装
linux
kangk126 小时前
linux常见指令与实例(生物信息方向)
linux
hhcgchpspk7 小时前
一次msf免杀渗透入门实践
linux·经验分享·网络安全·系统安全·渗透·msf
小白勇闯网安圈7 小时前
Vmware的Ubuntu构建极简版Linux发行版
linux
刘某的Cloud7 小时前
shell脚本-read-输入
linux·运维·bash·shell·read
broad-sky8 小时前
Ubuntu上查看USB相机连接的是哪个口,如何查看
linux·数码相机·ubuntu