Centos6-7命令更改(部分)

一:简介
systemd整合了chkconfig与server命令为一体,可以很好的做到永久性启用/禁用、禁用/开启当前会话中的服务。

二:命令使用

systemctl [状态] [服务名称]

systemctl
#查看现在运行的所有服务
systemctl start sshd #启动sshd服务
systemctl stop sshd #停止sshd服务
systemctl status sshd #查看sshd服务的状态(active“runing”表示开启)
systemctl enable sshd #开机时启动sshd
systemctl disable sshd #开机时关闭sshd
systemctl is-enabled sshd #查看sshd是否开机自启动
systemctl restart network #重启网络服务
systemctl isolate runlevel3.target #切换到运行级别3
systemctl set-default multi-user.target #修改默认运行级别为3


作者:Aiden-
来源:CSDN
原文:https://blog.csdn.net/loame_zyq/article/details/79752609
版权声明:本文为博主原创文章,转载请附上博文链接!

3、修改系统语言为UTF8/GB18030

5/6版本:/etc/sysconfig/i18n

7版本:/etc/locale.conf ; LANG=“zh_CN.utf8” ; source /etc/locale.conf

2、systemctl开机自启动服务(以vsftpd为例)

5/6版本:chkconfig --level 3 vsftpd on

7版本:systemctl enable vsftpd.service

5/6版本:chkconfig --list

7版本:systemctl list-units --type=service

1、systemctl重启系统服务(以重启vsftpd举例)。

5/6版本:/etc/init.d/vsftpd restart 或者 service vsftpd restart
7版本:systemctl restart vsftpd.service


作者:杯子哥
来源:CSDN
原文:https://blog.csdn.net/featue/article/details/80042343
版权声明:本文为博主原创文章,转载请附上博文链接!

猜你喜欢

转载自blog.csdn.net/weixin_44687427/article/details/88212604