Debian安装完net-tools后ifconfig命令还是不能用的解决方案

ThanksView 2022-09-16 16:46:19

Debian安装完net-tools后ifconfig命令还是不能用的解决方案

Debian安装完net-tools后ifconfig命令还是不能用的解决方案
1.安装net-tools
首先安装net-tools

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install net-tools

安装完执行ifconfig命令还是提示命令找不到!


2.使用ip addr命令查看
在Debian 10 (从Debian 9 stretch以后 )中,ifconfig命令已被弃用,这就是为什么你会得到ifconfig命令丢失的错误,解决这个障碍的方法是使用ip addr,它可以与ifconfig命令执行相同的任务!


3.完美使用ifconfig命令
安装完net-tools后,使用whereis ifconfig查看ifconfig的位置

whereis ifconfig
接着执行以下命令:

alias ifconfig='/sbin/ifconfig'
然后在执行ifconfig就不会提示命令找不到的错误了!!!

回帖列表
4111111111111111 2025-03-30 09:37:08
1
4111111111111111 2025-03-30 09:37:08
1
4111111111111111 2025-03-30 09:37:01
1
4111111111111111 2025-03-30 09:36:58
1
4111111111111111 2025-03-30 09:36:55
1
4111111111111111 2025-03-30 09:36:52
1
4111111111111111 2025-03-30 09:36:46
1
4111111111111111 2025-03-30 09:36:45
1
4111111111111111 2025-03-30 09:36:29
1
4111111111111111 2025-03-30 09:36:28
1
上拉显示下一页
1/ 3
粤ICP备18089419号