Debian 安装完 net-tools 后无法使用 ifconfig 命令
# 教程
1.安装net-tools
apt-get update
apt-get upgrade
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 就不会提示命令找不到的错误了!!!