在Linux终端中:
ifconfig抛出bash: ifconfig: command not foundlocate命令也会这样做。sudo yum install net-tools抛出:bash: yum: command not found也是,但是当我测试它时,我可能也犯了一个拼写错误。这意味着,我必须安装ifconfig吗?还是有其他命令?
发布于 2021-01-28 22:58:42
不同的linux发行版有不同的工具来安装包,称为包管理器--您需要为您的发行版使用正确的工具。Yum是红帽系统的软件包管理人员。相反,您需要使用apt,Ubuntu的包管理器。尝试:
sudo apt install net-tools locate
这种模式应该适用于Ubuntu上的大多数包。net-tools是在Ubuntu上包含ifconfig的包。然而,ifconfig已经过时了好几年了。您应该使用ip,它应该已经安装在Ubuntu中了。
发布于 2021-01-28 23:12:48
在基于debian的发行版(Ubuntu)上安装net-tools和mlocate:
sudo apt install net-tools
sudo apt install mlocate
updatedb发布于 2021-01-29 05:06:42
他们现在没有交付标准模块。
定位需要安装
apt-get install locate在默认包中已经替换了ifconfig,您可以使用IP代替,示例命令:
ip address show
ip link show否则,安装ifconfig的网络工具。
apt-get install net-toolshttps://unix.stackexchange.com/questions/631542
复制相似问题