centos6版本和centos7版本命令的一些区别

防火墙的名字

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
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值