man:
centos 6.x
0 1 2 3 4 5 6 |
[root@Centos6 ~]# whatis man man: nothing appropriate [root@Centos6 ~]# makewhatis [root@Centos6 ~]# man -f man man (1) - format and display the on-line manual pages man.config [man] (5) - configuration data for man man [manpath] (1) - format and display the on-line manual pages |
centos 7.x
0 1 2 3 4 5 6 |
[root@Centos7 ~]# man -f man man: nothing appropriate. [root@Centos7 ~]# makewhatis -bash: makewhatis: command not found [root@Centos7 ~]# mandb [root@Centos7 ~]# man -f man man (1) - an interface to the on-line reference manuals |
服务启动:SourceByrd's Weblog-https://note.t4x.org/basic/centos6x-diff-centos7x/
centos6.x:
0 1 2 3 4 5 6 |
[root@Centos6 ~]# /etc/init.d/sshd status #查询sshd服务状态 openssh-daemon (pid 1183) is running... [root@Centos6 ~]# /etc/init.d/sshd restart #重新启动sshd服务 Stopping sshd: [ OK ] Starting sshd: [ OK ] [root@Centos6 ~]# service sshd restart #重新启动sshd服务 [root@Centos6 ~]# chkconfig --list|grep 3:on #启动服务 |
centos7.x:
0 1 2 3 4 5 6 7 8 9 |
[root@Centos7 ~]# systemctl status sshd.service #查询sshd服务状态 sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled) Active: active (running) since Tue 2016-01-12 16:04:22 CST; 5min ago Process: 2018 ExecStartPre=/usr/sbin/sshd-keygen (code=exited, status=0/SUCCESS) Main PID: 2019 (sshd) CGroup: /system.slice/sshd.service └─2019 /usr/sbin/sshd -D [root@Centos7 ~]# systemctl restart sshd.service #重新启动sshd服务 [root@Centos7 ~]# systemctl list-unit-files|grep enabled #查询所有启动服务 |
防火墙
centos6.x(默认是iptables):
0 |
[root@Centos6 ~]# iptables -t filter -A INPUT -p tcp --dport 22 -j ACCEPT #允许22端口,默认sshd服务 |
centos7.x(默认是firewalld):
0 |
[root@Centos7 ~]# firewall-cmd --permanent --zone=public --add-port=22/tcp #允许22端口,默认sshd服务 |
语言:
centos6.x
0 1 2 |
[root@centos6 /]# cat /etc/sysconfig/i18n LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 |
centos7.x
0 1 2 |
[root@centos7 ~]$ cat /etc/locale.conf LANG="en_US.UTF-8" SYSFONT="latarcyrheb-sun16" |
man page 转换纯文本:
centos6.x
0 |
[root@centos6 /]# man test | col -b > 1.txt #内容中有反斜杠,保留后面的内容 |
centos7.x
0 |
[root@centos6 /]# man test >1.txt #7貌似过滤了 |
未完待续!!!SourceByrd's Weblog-https://note.t4x.org/basic/centos6x-diff-centos7x/
申明:本文版权属于Byrd's Blog(t4x.org),转载请注明出处。商业使用请联系我们.SourceByrd's Weblog-https://note.t4x.org/basic/centos6x-diff-centos7x/ SourceByrd's Weblog-https://note.t4x.org/basic/centos6x-diff-centos7x/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!