\# systemctl --failedUNIT LOAD ACTIVE SUB DESCRIPTIONkdump.service loaded failed failed Crash recovery kernel armingLOAD =Reflects whether the unit definition was properly loaded.ACTIVE =The high-level unit activation state, i.e. generalization of SUB.SUB =The low-level unit activation state, values depend on unit type.1 loaded units listed.Pass--all to see loaded but inactive units, too.To show all installed unit files use'systemctl list-unit-files'.
列出自启动服务
#systemctl list-dependencies
Linux中如何启动、重启、停止、重载服务以及检查服务(如 httpd.service)状态
12345678910111213141516171819202122
\# systemctl start httpd.service\# systemctl restart httpd.service\# systemctl stop httpd.service\# systemctl reload httpd.service\# systemctl status httpd.servicehttpd.service -TheApache HTTP ServerLoaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)Active: active (running) since Tue2015-04-2817:21:30 IST;6s agoProcess:2876ExecStop=/bin/kill -WINCH ${MAINPID}(code=exited, status=0/SUCCESS)Main PID:2881(httpd)Status:"Processing requests..."CGroup:/system.slice/httpd.service├─2881/usr/sbin/httpd -DFOREGROUND├─2884/usr/sbin/httpd -DFOREGROUND├─2885/usr/sbin/httpd -DFOREGROUND├─2886/usr/sbin/httpd -DFOREGROUND├─2887/usr/sbin/httpd -DFOREGROUND└─2888/usr/sbin/httpd -DFOREGROUNDApr2817:21:30 tecmint systemd\[1\]:StartingTheApache HTTP Server...Apr2817:21:30 tecmint httpd\[2881\]: AH00558: httpd:Couldnot reliably determine the server's fully q...ssageApr 28 17:21:30 tecmint systemd\[1\]: Started The Apache HTTP Server.Hint: Some lines were ellipsized, use -l to show in full.
\# systemctl rescueBroadcast message from root@tecmint on pts/0(Wed2015-04-2911:31:18 IST):The system is going down to rescue mode NOW!
33. 进入紧急模式
1234
\# systemctl emergencyWelcome to emergency mode!After logging in, type "journalctl -xb" to viewsystem logs,"systemctl reboot" to reboot,"systemctl default" to try againto boot intodefault mode.