{"id":726,"date":"2015-06-11T10:28:00","date_gmt":"2015-06-11T10:28:00","guid":{"rendered":"http:\/\/blog.stmellion.org\/?p=726"},"modified":"2017-02-16T09:48:11","modified_gmt":"2017-02-16T09:48:11","slug":"systemd-cheat-sheet","status":"publish","type":"post","link":"https:\/\/blog.stmellion.org\/?p=726","title":{"rendered":"systemd Cheat Sheet"},"content":{"rendered":"<h2>systemctl<\/h2>\n<p>List units<br \/>\nsystemctl<\/p>\n<p>systemctl start\/stop\/restart\/reload unit<\/p>\n<p>systemctl status unit<\/p>\n<p>systemctl is-enabled unit<\/p>\n<p>systemctl mask unit &#8211; Prevent a unit from starting<\/p>\n<p>systemctl unmask unit &#8211; Allow a unit to start<\/p>\n<p>systemctl reboot\/poweroff<\/p>\n<p>Copy the unit file and create a custom version (overriding the original)<br \/>\nsystemctl edit &#8211;full unit<\/p>\n<p>Show units that failed to start<br \/>\nsystemctl &#8211;failed<\/p>\n<h3>Target Runlevels<\/h3>\n<table>\n<tbody>\n<tr>\n<td>rescue.target<\/td>\n<td>Single user mode<\/td>\n<\/tr>\n<tr>\n<td>multi-user.target<\/td>\n<td>Multi-user, non-graphical<\/td>\n<\/tr>\n<tr>\n<td>graphical.target<\/td>\n<td>Multi-user, graphical<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Switching targets<\/b><br \/>\nsystemctl isolate multi-user.target<\/p>\n<h2>journalctl<\/h2>\n<p>List entire log (in a less style interface)<br \/>\njournalctl<\/p>\n<p>Real-time log display<br \/>\njournalctl -f<\/p>\n<p>Show log messages relating to a specific PID<br \/>\njournalctl _PID=1234<\/p>\n<p>Show log messages relating to a specific unit<br \/>\njournalctl -u unit<\/p>\n","protected":false},"excerpt":{"rendered":"<p>systemctl List units systemctl systemctl start\/stop\/restart\/reload unit systemctl status unit systemctl is-enabled unit systemctl mask unit &#8211; Prevent a unit from starting systemctl unmask unit &#8211; Allow a unit to start systemctl reboot\/poweroff Copy the unit file and create a custom version (overriding the original) systemctl edit &#8211;full unit Show units that failed to start&hellip; <a class=\"more-link\" href=\"https:\/\/blog.stmellion.org\/?p=726\">Continue reading <span class=\"screen-reader-text\">systemd Cheat Sheet<\/span><\/a><\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-726","post","type-post","status-publish","format-standard","hentry","category-debian","entry"],"_links":{"self":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts\/726","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=726"}],"version-history":[{"count":3,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts\/726\/revisions"}],"predecessor-version":[{"id":741,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=\/wp\/v2\/posts\/726\/revisions\/741"}],"wp:attachment":[{"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.stmellion.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}