命令 | centos6 | centos7 |
ifconfig | 有 | 有 yum install -y net-tools |
systemctl start service_name
自启动
[CentOS6]
$ chkconfig service_name on/off
[CentOS7]
$ systemctl
enable service_name
kernel | 2.6 | 3.10 |
网卡 | eth0 | 成为了可预见性的命名规则 |
文件系统 | ext4 | xfs |
强制停止
[CentOS6]
$ kill -9 <PID>
[CentOS7]
$ systemctl kill --signal=9 sshd
主机名 | cat /etc/sysconfig/network | cat /etc/hostname |
防火墙 | iptables | 被firewalld取代 |
文件结构
[CentOS6] /bin,/sbin,/lib,and /lib64在
/下
[CentOS7] /bin,and /lib64移到/usr下
IP地址MAC地址
[CentOS6]
$ ifconfig -a
[CentOS7]
$ ip address show
[CentOS6]$ shutdown -h Now
[CentOS7]
$ poweroff
$ systemctl poweroff
防火墙
systemctl status firewalld
systemctl stop firewalld
继续使用老版防火墙:
systemctl stop firewalld
yum installed -y iptables-services
systemctl enable iptables
systemctl start iptables
参考: