防火墙的名字
centos6 iptables
centos7 firewalld
文件结构
centos6 /bin,/sbin,/lib,/lib64在根目录/下面
centos7 /bin,/sbin,/lib,/lib64在/usr目录下面
主机名
centos6 /etc/sysconfig/network
centos7 /etc/hostname
服务相关
centos6
service 服务名称 stop
service sshd restart/status/reload
centos7
systemctl start 服务名称
systemctl restart/status/reload sshd
自启动
centos6 chkconfig servie_name on/off
centos7 systemctl enable/disable 服务名称
服务一览
centos6 chkconfig --list
centos7 systemctl list-unit-files /systemctl --type service
强制停止
centos6 kill -9 pid的名字
centos7 systemctl kill --signal=9 sshd
网络信息
centos6 netstat/netstat -l/netstat -n
centos7 ip n/ip -s l/ss
ip地址mac地址
centos6 ifconfig -a
centos7 ip address show
路由
centos6 route -n/route -A inet6 -n
centos7 ip route show/ip -6 route show
关闭系统命令
centos6 shutdown -h now
centos7 poweroff/systemctl poweroff
重启命令
centos6 reboot/shutdown -r now
centos7 reboot /systemctl reboot