每天一个Linux命令(55)systemctl命令
2016-06-22 08:11
1086 查看
systemctl命令是系统服务管理器指令,它实际上将 service 和 chkconfig 这两个命令组合到一起。
[b] (1)用法:[/b]
[b] 用法: systemctl [参数] [服务][/b]
[b] (2)功能:[/b]
[b] 功能: systemd 是 Linux 下的一款系统和服务管理器,兼容 SysV 和 LSB 的启动脚本。[/b]
[b] (3)选项参数:[/b]
start,stop,restart,status,enable,disable,is-enabled
[b] (4)实例:[/b]
1)[root@localhost sunjimeng]# systemctl | more -5 显示所有已经激活的服务
2)[root@localhost sunjimeng]# systemctl list-unit-files |more -5 显示所有已经安装的服务
3)[root@localhost sunjimeng]# systemctl is-enabled telnet.socket 查看特定服务是否设定为开机自启
[b] (5)其他:[/b]
systemd 的特性有:
[b] (1)用法:[/b]
[b] 用法: systemctl [参数] [服务][/b]
[b] (2)功能:[/b]
[b] 功能: systemd 是 Linux 下的一款系统和服务管理器,兼容 SysV 和 LSB 的启动脚本。[/b]
[b] (3)选项参数:[/b]
start,stop,restart,status,enable,disable,is-enabled
[b] (4)实例:[/b]
1)[root@localhost sunjimeng]# systemctl | more -5 显示所有已经激活的服务
[root@localhost sunjimeng]# systemctl | more -5 UNIT LOAD ACTIVE SUB DESCRIPTION proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable File Formats File System Automount Point sys-devices-pci0000:00-0000:00:07.1-ata2-host1-target1:0:0-1:0:0:0-block-sr0.device loaded active plugged --More-- [5]+ 已停止 systemctl | more -5 [root@localhost sunjimeng]# systemctl list-units |more -5 UNIT LOAD ACTIVE SUB DESCRIPTION proc-sys-fs-binfmt_misc.automount loaded active running Arbitrary Executable File Formats File System Automount Point sys-devices-pci0000:00-0000:00:07.1-ata2-host1-target1:0:0-1:0:0:0-block-sr0.device loaded active plugged --More--
2)[root@localhost sunjimeng]# systemctl list-unit-files |more -5 显示所有已经安装的服务
[root@localhost sunjimeng]# systemctl list-unit-files |more -5 UNIT FILE STATE proc-sys-fs-binfmt_misc.automount static dev-hugepages.mount static dev-mqueue.mount static proc-fs-nfsd.mount static --More--
3)[root@localhost sunjimeng]# systemctl is-enabled telnet.socket 查看特定服务是否设定为开机自启
[root@localhost sunjimeng]# systemctl is-enabled telnet.socket enabled [root@localhost sunjimeng]# chkconfig telnet.socket //这里不需要再加上.socket(加上之后没有反应) [root@localhost sunjimeng]# chkconfig telnet 注意:正在将请求转发到“systemctl is-enabled telnet.socket”。 enabled
[b] (5)其他:[/b]
systemd 的特性有:
支持并行化任务; 同时采用 socket 式与 D-Bus 总线式激活服务; 按需启动守护进程(daemon); 利用 Linux 的 cgroups 监视进程; 支持快照和系统恢复; 维护挂载点和自动挂载点; 各服务间基于依赖关系进行精密控制。
相关文章推荐
- linux系统安装rsync和sersync实现数据实时同步详细步骤(rsync实时同步)
- linux数据拷贝复制到移动硬盘的问题
- CentOS 6.5下JIRA安装部署
- linux中fcntl()、lockf、flock的区别
- linux下执行mysql的sql文件
- mysql 5.7.13 安装配置方法图文教程(linux)
- Linux环境mysql5.7.12安装教程
- CentOS 7安装配置Samba
- (总结)Linux的chattr与lsattr命令详解
- linux任务后台执行方法
- 64位CentOS系统中安装32位开发库
- 小凡的Linux主机与时间服务器同步记录
- linux常用基本命令总结
- linux tar 命令
- stat函数讲解(转)
- Linux下调试工具gdb的使用方法
- centos mysql root用户登录失败解决方法
- Linux 系统性能分析工具图解读
- Linux下用于查看系统当前登录用户信息的4种方法
- 安装交叉编译器