systemctl 相关命令
systemctl
相关命令:service,chkconfig
systemd 是 Linux 下的一款系统和服务管理器,兼容 SysV 和 LSB 的启动脚本。systemd 的特性有:支持并行化任务;同时采用 socket 式与 D-Bus 总线式激活服务;按需启动守护进程(daemon);利用 Linux 的 cgroups 监视进程;支持快照和系统恢复;维护挂载点和自动挂载点;各服务间基于依赖关系进行精密控制。
任务 旧指令 新指令
使某服务自动启动 chkconfig --level 3 httpd on systemctl enable httpd.service
使某服务不自动启动 chkconfig --level 3 httpd off systemctl disable httpd.service
检查服务状态 service httpd status systemctl status httpd.service (服务详细信息) systemctl is-enabled httpd.service (仅显示是否 Active)
显示所有已启动的服务 chkconfig --list systemctl list-units --type=service
启动某服务 service httpd start systemctl start httpd.service
停止某服务 service httpd stop systemctl stop httpd.service
重启某服务 service httpd restart systemctl restart httpd.service
某服务重新加载配置文件 service httpd reload systemctl reload httpd.service
# systemctl #输出已激活单元
# systemctl list-units #输出已激活单元
# systemctl --failed #输出运行失败的单元
# systemctl list-unit-files #查看所有已安装服务
# systemctl start nginx #启动nginx
# systemctl stop nginx #停止nginx
# systemctl restart nginx #重启nginx
# systemctl reload nginx #重新加载nginx配置
# systemctl status nginx #输出nginx运行状态
# systemctl is-enabled nginx #检查nginx是否配置为自动启动
# systemctl enable nginx #开机自动启动nginx
# systemctl disable nginx #取消开机自动启动nginx
# systemctl help nginx #显示nginx的手册页
# systemctl daemon-reload #重新载入 systemd,扫描新的或有变动的单元
# systemctl reboot #重启
# systemctl poweroff #退出系统并停止电源
# systemctl suspend #待机
# systemctl hibernate #休眠
# systemctl hybrid-sleep #混合休眠模式(同时休眠到硬盘并待机
# systemctl isolate graphical.target #等价于telinit 3 或 telinit 5
systemctl 相关命令的更多相关文章
- Systemd程序及相关命令
Systemd程序及相关命令 Systemd是一款用于Linux操作系统系统管理和服务管理的工具.它向后兼容SysV init脚本,并且支持许多类似于startup系统服务的功能,比如系统快照(sna ...
- linux centos7 防火墙及端口开放相关命令
一.防火墙相关命令 1.查看防火墙状态 : systemctl status firewalld.service 注:active是绿的running表示防火墙开启 2.关闭防火墙 :systemct ...
- linux:相关命令以及笔记
首先,在linux 或者 unix里没有任何的反馈就叫成功,例如: (1)命令执行成功的样子:返回了登录用户信息 (2)命令执行失败的样子:没有返回任何东西 1.按键出现状况 解决:可以使用ctrl+ ...
- Linux网络——配置防火墙的相关命令
Linux网络——配置防火墙的相关命令 摘要:本文主要学习了如何在Linux系统中配置防火墙. iptables命令 iptables准确来讲并不是防火墙,真正的防火墙是运行于系统内核中的netfil ...
- linux安装mysql以及修改密码和重启mysql等相关命令
Linux/UNIX 上安装 MySQL Linux平台上推荐使用RPM包来安装Mysql,MySQL AB提供了以下RPM包的下载地址: MySQL - MySQL服务器.你需要该选项,除非你只想连 ...
- Docker容器化【Docker镜像与容器相关命令】
# Docker 学习目标: 掌握Docker基础知识,能够理解Docker镜像与容器的概念 完成Docker安装与启动 掌握Docker镜像与容器相关命令 掌握Tomcat Nginx 等软件的常用 ...
- linux 搜索相关命令(2)
文件搜索相关命令 1:locate命令 需要 yum install mlocate locate 文件名 在后台数据库中按文件名搜索,搜索速度更快 /var/lib/mlocate #locate命 ...
- 《The Linux Command Line》 读书笔记04 Linux用户以及权限相关命令
Linux用户以及权限相关命令 查看身份 id:Display user identity. 这个命令的输出会显示uid,gid和用户所属的组. uid即user ID,这是账户创建时被赋予的. gi ...
- linux 目录结构及其相关命令
目录也是一个文件,它的唯一功能是用来保存文件及其相关信息.所有的文件,包括普通文件.设备文件和目录文件,都会被保存到目录中. 主目录 登录后,你所在的位置就是你的主目录(或登录目录),如果是root用 ...
随机推荐
- Linux双网卡绑定bond详解
参考资料: 1.https://blog.csdn.net/shengerjianku/article/details/79221886
- 【LeetCode】队列 queue(共8题)
[346]Moving Average from Data Stream [353]Design Snake Game [363]Max Sum of Rectangle No Larger Than ...
- Sass Maps的函数-map-keys($map)
map-keys($map) 函数将会返回 $map 中的所有 key.这些值赋予给一个变量,那他就是一个列表.如: map-keys($social-colors); 其返回的值为: "d ...
- CF883J 2017-2018 ACM-ICPC, NEERC, Southern Subregional Contest - J. Renovation 贪心+树状数组
首先对于一个月的预算,如果非常小的话,我们可以留到后面的 \(a_i\) 最大的月来用,因为 \(a_i\) 越大能够拆建筑的越多. 于是我们把 \(a_i\) 合并给 \(i\) 后面的 \(a\) ...
- Oracle 行转列(pivot、wm_concat、decode)使用总结
CREATE TABLE CC (Student NVARCHAR2(2),Course NVARCHAR2(2),Score INT ); INSERT into CC select N'张三',N ...
- CentOS7.5 安装部署Apache+Mysql+Php
系统:CentOS7.5 安装Apache 安装 yum -y install httpd 开启apache服务 systemctl start httpd.service 设置apache服务开机启 ...
- CentOS7 安装KVM
检测 输入命令如果有输出表示CPU支持虚拟化 grep -E 'svm|vmx' /proc/cpuinfo 检查模块(保证有如下内容) lsmod | grep kvm 结果如下:(kvm_inte ...
- kali网络源配置
使用vim对sources.list文件进行修改: $ vim /etc/apt/sources.list 随便挑选一个源添加到该文件中 ----------------------------- ...
- nuget cli 打包发包
微软官网打包说明:https://docs.microsoft.com/zh-cn/nuget/quickstart/create-and-publish-a-package-using-visual ...
- mysql8.0.15出错
昨天装了一个wireshark,一个fiddler,导致晚上项目启动一直报init database出错,卸载了两个软件,还是不行,后来一看mysql服务停止了,但启动总是失败.按照网上的方法好了. ...