文章目录
使用命令 launchctl 停止某个进程
- 使用命令 launchctl 停止某个进程
- 使用命令 launchctl 启动某个进程
- 使用命令 launchctl 查看某个进程是否启动
liaowenongdeair:bin root# sudo launchctl unload -w /System/Library/LaunchDaemons/ssh.plist
说明: .plist
文件是 Objective-C 编程架构中的配置文件,说明服务管理器 launchctl
是 OC 写的
liaowenongdeair:bin root# sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
使用命令 launchctl 查看某个进程是否启动
liaowenongdeair:bin root# sudo launchctl list|grep sshd
- 0 com.openssh.sshd