转自:http://stackoverflow.com/questions/808560/how-to-detect-the-physical-connected-state-of-a-network-cable-connector You want to look at the nodes in /sys/class/net/ I experimented with mine: Wire Plugged in: eth0/carrier:1eth0/operstate:unknown Wire
linux 6 查看防火墙状态及开启关闭命令 https://blog.csdn.net/lv_shijun/article/details/52453882 存在以下两种方式: 一.service方式 查看防火墙状态: [root@centos6 ~]# service iptables status iptables:未运行防火墙. 开启防火墙: [root@centos6 ~]# service iptables start 关闭防火墙: [root@centos6 ~]# service