Skip to main content
 Web开发网 » 操作系统

如何用命令查看centos系统是否联网?

2021年10月13日7770百度已收录

ifconfig –a 。 在 CentOS 7 minimal 系统中,可以用 “ip addr”、“ip link”查看网络连接及其状态,使用“ip –s link”还可以查看统计信息。如果还是想使用 ifconfig 的话就需要自己安装了。 先得知ifconfig 指令是哪个软件包提供的,yum provides ifconfig 或者,yum whatprovides ifconfig 可以查询到对应的软件包为 net-tools,安装它,yum install net-tools 安装好了就可以用 ifconfig –a 查看网络状态。   当然这样的方法也适用于查询其它想用但是又找不到对应指令的安装软件包的情况。   将 Linode VPS 也部署成 CentOS 7 了,才发现 Linode 上的 CentOS 7 已经定制过,包含了常用的但是在 7 版中已经废弃的指令,如 ifconfig、netstat、iptables等。

评论列表暂无评论
发表评论
微信