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
相关推荐
阿钱真强道9 小时前
22 嵌入式操作系统 | 串口命令行调试(socat / stty / printf / hexdump)
ubuntu·cmake·uci·ubus·libubox
顺顺 尼10 小时前
linux 进程信号(上)
linux·c++·算法
niuTaylor10 小时前
飞腾 FT-2000/4 Ubuntu 内存卡 / NVMe SSD 系统制作完整指南
linux·服务器·人工智能·驱动开发·单片机
傲世仙尊11 小时前
信号量环形队列与线程池起步-把临界资源拆成很多份
linux
Huangjin007_11 小时前
【Linux 系统篇(二十五)】文件(二) 系统文件I/O详解
linux·运维·服务器
ShineWinsu12 小时前
对于ProtoBuffer:ProtoBuffer的介绍以及安装
linux·网络·google·协议·序列化·反序列化·protobuffer
FlightYe13 小时前
视界原理之2D视频(二):视频文件里有什么
android·linux·网络·c++·ffmpeg·音视频·aac
GeW14 小时前
从代码到共识:技术突围如何映照大国相处之道
linux
承渊政道15 小时前
Linux系统学习【进程信号详细解析——认识、产生、保存以及捕捉信号】
linux·学习·ubuntu·ssh·vs code·进程信号
硅基手札15 小时前
【linux内核专栏01】Linux 内核心智模型与设计哲学
linux·运维·驱动开发·开源软件