CentOS 7 / RHEL 7 ifconfig netstat 以及其他命令对照
CentOS 沉寂一段时间,在快要忘记它的存在时突然在去年推出CentOS 7,不过一直到现在才有机会安装测试,详细的更新资讯请自行前往,不过,
安装完后才发现CentOS/RHEL 7对于系统命令有些许的变化,不管如何还是要适应这个带来的变化,目前查询到的对照表如下:
Before | CentOS 7 |
---|---|
ifconfig | ip a(addr), ip l(link) |
route | ip r(route) |
ip r(route) | ss |
netstat -i | ip -s l(link) |
arp | ip n(neighbor) |
traceroute/traceroute6 | tracepath |
ifconfig eth1 up(down) | ip l set eth1 up(down) |
service start(stop/restart) | systemctl start(stop/reload) |
chkconfig on(off) servicename | systemctl enable(disable) servicename |
chkconfig –list | systemctl list-unit-files –type=service |
chkconfig servicename | systemctl is-enabled servicename |