centos6.5和centos7常用命令不同写法对照表

前言

以下是一些CentOS 6.5和CentOS 7中常用的命令对照表。请注意,这只是一个简要的对比,实际使用中可能会有一些细微的差异。

启动、停止和重启服务:

CentOS 6.5:

service serviceName start/stop/restart

CentOS 7:

systemctl start/stop/restart serviceName

查看服务状态:

CentOS 6.5:

service serviceName status

CentOS 7:

systemctl status serviceName

防火墙管理:

CentOS 6.5:

service iptables start/stop/restart

CentOS 7:

systemctl start/stop/restart firewalld

查看网络信息:

CentOS 6.5:

ifconfig

CentOS 7:

ip addr show

查看系统日志:

CentOS 6.5:

tail /var/log/messages

CentOS 7:

journalctl

查看内存和CPU信息:

CentOS 6.5:

free -m

CentOS 7:

free -h

管理用户和组:

CentOS 6.5:

useradd username

CentOS 7:

adduser username

服务启动设置:

CentOS 6.5:

chkconfig serviceName on/off

CentOS 7:

systemctl enable/disable serviceName

系统时间同步:

CentOS 6.5:

service ntpd start/stop/restart

CentOS 7:

systemctl start/stop/restart chronyd
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值