服务管理测验
Linux 测验题
通过对Linux 基础教程系统地学习,相信你已全面掌握了 Linux 服务管理知识点,为了巩固所学的内容,我们准备了一个小测验。
通过这个测验,您可以检验自己对 Linux 的掌握程度,发现可能需要进一步巩固的地方。
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
1. 在Linux中,哪个命令用于启动systemd服务?
- service start
- initctl start
- systemctl start
- startservice
2. 哪个命令用于查看systemd服务的状态?
- service status
- systemctl status
- ps aux
- status service
3. 如何设置systemd服务开机自启?
- systemctl autostart
- chkconfig on
- service enable
- systemctl enable
4. 哪个命令用于重新加载systemd配置?
- systemctl daemon-reload
- systemctl reload
- service reload
- initctl reload
5. 如何查看所有已启动的systemd服务?
- systemctl list-services
- service --status-all
- systemctl list-units --type=service
- ps -ef | grep systemd
6. 哪个目录包含systemd服务单元文件?
- /etc/init.d/
- /etc/systemd/system/
- /usr/lib/systemd/
- /var/lib/systemd/
7. 如何重启一个systemd服务?
- systemctl reload
- service restart
- initctl restart
- systemctl restart
8. 哪个命令用于禁用systemd服务开机启动?
- systemctl disable
- systemctl remove
- chkconfig off
- service disable
9. 如何查看systemd服务的日志?
- tail -f /var/log/messages
- systemctl log
- journalctl -u
- service log
10. 哪个命令用于查看服务的依赖关系?
- systemctl depends
- systemctl list-dependencies
- service dependencies
- ldd service
11. 如何屏蔽一个systemd服务?
- systemctl disable
- systemctl stop
- systemctl hide
- systemctl mask
12. 如何解除对systemd服务的屏蔽?
- systemctl unmask
- systemctl enable
- systemctl unblock
- systemctl show