CentOS7 之ifconfig, netstat 取代命令
官方wiki解释是
ifconfig 及 netstat 工具程序在 CentOS 5 及 6 的应用手册内被置标为降级已接近十年,而 Redhat 决定在 CentOS 7 不会缺省安装 net-tools 组件。其中一个转换的原因就是 ifconfig 不会显示界面卡所拥有的全部 IP 位置 —— 请改用 ip 指令。取而代之的工具是 ss 和 ip。假如你真的、真的很需要 ifconfig 和 netstat,你可执行 yum install net-tools。
那就熟悉用这些命令吧
ip 替代 ifconfig
ip a
ip route
ss 替代 netstat
比较好的格式化输出命令为:ss -ntulp | colume -t
还有 ss -nulp4 | cat -A
没有这个必要,我相信使用Linux系统的,没有人会不用Busybox。
所以如果实在需要ifconfig、netstat
你直接
busybox ifconfig
busybox netstat
就完事儿了....
centos7 已经移除了busybox,具体见:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/migration_planning_guide/sect-red_hat_enterprise_linux-migration_planning_guide-removed_packages