centos6和7对比

之前一直玩6,7出来后一直没接触过,趁着淡季多学点东西。从最简单的安装开始,到RHCE常用实验搭建。

关于6和7的对比。做了一些名字改动。转自微博:https://www.cnblogs.com/bethal/p/5945026.html

                                                            系统改动

名称

CentOS6

Centos7

桌面系统GNOME 2.xGNOME 3.x(GNOME Shell)
文件系统ext4xfs
内核版本2.6.x-x3.10.x-x
启动加载器GRUB Legacy (+efibootmgr)GRUB2
防火墙iptablesfirewalld
默认数据库MySQLMariaDB
系统目录 /bin, /sbin, /lib, and /lib64在/下/bin, /sbin, /lib, and /lib64移到/usr下
修改主机名/etc/sysconfig/network/etc/hostname
时间同步ntp & ntpq -pchrony & chronyc sources
修改时区vim /etc/sysconfig/clock
   ZONE="Asia/Tokyo"
   UTC=fales
$ sudo ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
$ timedatectl set-timezone Asia/Tokyo
$ timedatectl status
修改默认语言vim /etc/sysconfig/i18n
   LANG="ja_JP.utf8"
$ /etc/sysconfig/i18n
$ locale
$ localectl set-locale LANG=ja_JP.utf8
$ localectl status

                                                               常用命令改动

名称Centos6Centos7
启动停止$ service service_name start
$ service service_name stop
$ systemctl start service_name
$ systemctl stop service_name
$ systemctl restart/status/reload sshd
自启动$chkconfig service_name on/off$ systemctl enable service_name
$ systemctl disable service_name
服务一览chkconfig --list

systemctl list-unit-files

systemctl --type service

杀进程$ kill -9 <PID>$ systemctl kill --signal=9 sshd
网络$ netstat
$ netstat -I
$ netstat -n
$ ip n
$ ip -s l
$ ss
查看IP$ ifconfig -a ip address show
路由$ route -n
$ route -A inet6 -n
$ ip route show
$ ip -6 route show
关闭shutdown -h now $ poweroff
$ systemctl poweroff
重启$ reboot
$ shutdown -r now
$ reboot
$ systemctl reboot
用户模式init 3 $ systemctl rescue
启动模式$ vim /etc/inittab
  id:3:initdefault:
[CUIGUI]
$ startx
[GUICUI]
$ systemctl isolate multi-user.target
[CUIGUI]
$systemctl isolate graphical.target
默认
$ systemctl set-default graphical.target
$ systemctl set-default multi-user.target
当前
$ systemctl get-default

 

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值