6. 查看linux的开机启动项
时间: 2024-05-24 22:14:26 浏览: 10
你可以打开终端输入以下命令查看Linux的开机启动项:
systemctl list-unit-files --type=service
这个命令会列出所有已安装的systemd服务,其中包括开机启动项(启用和禁用的服务都会显示出来)。如果你只想查看已经启用的服务,可以加上"--state=running"参数。
相关问题
linux查看开机启动项
在Linux中,可以使用以下命令来查看开机启动项:
1. systemctl list-unit-files --type=service:列出所有系统服务的状态,包括启动状态和禁用状态。
2. systemctl status <service_name>:查看指定服务的状态,包括是否正在运行和最近的日志信息。
3. systemctl enable <service_name>:启用指定服务的开机自启动。
4. systemctl disable <service_name>:禁用指定服务的开机自启动。
5. ls /etc/init.d/:列出所有在/etc/init.d/目录下的服务脚本,这些脚本是用来启动和停止服务的。
6. chkconfig --list:列出所有系统服务的状态,包括启动状态和禁用状态。
linux查看开机自启动项
在Linux中,可以使用以下命令来查看开机自启动项:
1. systemctl list-unit-files --type=service:列出所有系统服务的状态,包括已启用和未启用的服务。
2. systemctl list-unit-files --type=service | grep enabled:列出所有已启用的系统服务。
3. chkconfig --list:列出所有已安装的服务及其启动级别。
4. ls /etc/init.d:列出所有在/etc/init.d目录下的启动脚本。
5. ls /etc/rc.d/rc*.d:列出所有在/etc/rc.d/rc*.d目录下的启动脚本。其中,*代表运行级别,如rc3.d代表运行级别为3的启动脚本。
希望对您有帮助!
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)