CentOS 6.x和CentOS 7.x的区别

来源:互联网 发布:黑马程序员有公司要么 编辑:程序博客网 时间:2024/05/29 15:11

应用场景

很多人在使用了CentOS 6以后,跳转到CentOS 7系统,发现命令不一致,倒是使用很不方便,容易混淆,这里列举一下两个版本的一些差别,方便大家在使用的过程中进行注意。

1. ifconfig,route

CentOS 6.x

系统自带,可以直接使用

CentOS 7.x

执行yum install net-tools

2. ntpd,ntpdate

CentOS 6.x

系统自带,可以直接使用

CentOS 7.x

执行yum install ntpd ntpdate

3. 参看版本号

CentOS 6.x

cat /etc/redhat-release

CentOS 7.x

cat /etc/redhat-release

4. 服务管理

CentOS 6.x

chkconfig /etc/init.d/服务

CentOS 7.x

systemctl

5. Python版本

CentOS 6.x

2.6

CentOS 7.x

2.7

6. 网卡

CentOS 6.x

/etc/sysconfig/network-scripts/ifcfg-eth0

CentOS 7.x

/etc/sysconfig/network-scripts/ifcfg-**** #自己的命名规则

7. 文件系统

CentOS 6.x

ext4

CentOS 7.x

xfs

8. 防火墙

CentOS 6.x

iptables

CentOS 7.x

firewalld

9. 操作服务

CentOS 6.x

service 服务名 start/stop/restart

CentOS 7.x

systemctl start/stop/restart 服务名.service

原创粉丝点击