{"id":12791,"date":"2019-03-28T20:28:14","date_gmt":"2019-03-28T20:28:14","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=12791"},"modified":"2019-03-28T20:28:14","modified_gmt":"2019-03-28T20:28:14","slug":"chkservice-an-easy-way-to-manage-systemd-units-in-terminal","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/28\/chkservice-an-easy-way-to-manage-systemd-units-in-terminal\/","title":{"rendered":"Chkservice \u2013 An Easy Way to Manage Systemd Units in Terminal"},"content":{"rendered":"<p><strong>Systemd<\/strong>\u00a0(system daemon) is a modern system management daemon for Linux systems. Systemd is a\u00a0<a href=\"https:\/\/www.tecmint.com\/systemd-replaces-init-in-linux\/\" target=\"_blank\" rel=\"noopener\">replacement for init system manager<\/a>; it controls system startup and services, and introduces the idea of units (managed via unit files) to identify different types of system resources such as services, devices, swap, automount, targets, paths, sockets and others.<\/p>\n<p>It ships in with\u00a0<strong>systemctl<\/strong>, a component for controlling systemd\u2019s behavior and units (starting, stopping, restarting, viewing status etc) using the command line. What if you simply want to manage units using keyboard shortcuts, that is where\u00a0<strong>chkservice<\/strong>\u00a0comes in.<\/p>\n<p><strong>Read Also<\/strong>:\u00a0<a href=\"https:\/\/www.tecmint.com\/manage-services-using-systemd-and-systemctl-in-linux\/\" target=\"_blank\" rel=\"noopener\">How to Manage \u2018Systemd\u2019 Services and Units Using \u2018Systemctl\u2019 in Linux<\/a><\/p>\n<p><strong>Chkservice<\/strong>\u00a0is an easy-to-use, ncurses-based command line tool for managing systemd units on a terminal. It lists units alphabetically under the categories (services, targets, automounts etc), showing the their status and description, and allows you, with superuser privileges to start, stop, enable and disable units.<\/p>\n<h3>Install chkservice in Linux Systems<\/h3>\n<p>On\u00a0<strong>Debian<\/strong>\u00a0and its derivatives,\u00a0<strong>chkservice<\/strong>\u00a0can be easily installed using its own PPA as shown.<\/p>\n<pre>$ sudo add-apt-repository ppa:linuxenko\/chkservice\r\n$ sudo apt-get update\r\n$ sudo apt-get install chkservice\r\n<\/pre>\n<p>On\u00a0<strong>Fedora<\/strong>\u00a0Linux distributions.<\/p>\n<pre># dnf copr enable srakitnican\/default\r\n# dnf install chkservice\r\n<\/pre>\n<p>On\u00a0<strong>Arch Linux<\/strong>\u00a0distribution.<\/p>\n<pre># git clone https:\/\/aur.archlinux.org\/chkservice.git\r\n# cd chkservice\r\n# makepkg -si\r\n<\/pre>\n<p>On other Linux distributions, you can build the release version using following commands.<\/p>\n<pre># git clone https:\/\/github.com\/linuxenko\/chkservice.git\r\n# mkdir build\r\n# cd build\r\n# cmake ..\/\r\n# make\r\n<\/pre>\n<p>Once you have installed\u00a0<strong>chkservice<\/strong>, launch it with root privileges using the\u00a0<a href=\"https:\/\/www.tecmint.com\/su-vs-sudo-and-how-to-configure-sudo-in-linux\/\" target=\"_blank\" rel=\"noopener\">sudo command<\/a>. It\u2019s output consists of four columns, the first showing enabled\/disabled\/masked status, the second showing started\/stopped status, unit name\/type and last column is the unit description.<\/p>\n<pre>$ sudo chkservice\r\n<\/pre>\n<div id=\"attachment_27333\" class=\"wp-caption aligncenter\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27333\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/09\/start-chkservice.png\" sizes=\"auto, (max-width: 1082px) 100vw, 1082px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/09\/start-chkservice.png 1082w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/09\/start-chkservice-768x433.png 768w\" alt=\"chkservice for Managing Systemd Services\" width=\"1082\" height=\"610\" aria-describedby=\"caption-attachment-27333\" data-lazy-loaded=\"true\" \/><\/p>\n<p id=\"caption-attachment-27333\" class=\"wp-caption-text\">chkservice for Managing Systemd Services<\/p>\n<\/div>\n<p>Chksericve unit status information:<\/p>\n<ul>\n<li><code>[x]<\/code>\u00a0\u2013 shows a unit is enabled.<\/li>\n<li><code>[ ]<\/code>\u00a0\u2013 shows a unit is disabled.<\/li>\n<li><code>[s]<\/code>\u00a0\u2013 indicates a static unit.<\/li>\n<li><code>-m-<\/code>\u00a0\u2013 shows a unit is masked.<\/li>\n<li><code>=<\/code>\u00a0\u2013 indicates unit has been stopped.<\/li>\n<li><code>&gt;<\/code>\u00a0\u2013 shows unit is running.<\/li>\n<\/ul>\n<p>Below are the chkservice navigation keys:<\/p>\n<ul>\n<li><code>Up\/k<\/code>\u00a0\u2013 move cursor up.<\/li>\n<li><code>Down\/j<\/code>\u00a0\u2013 move cursor down.<\/li>\n<li><code>PgUp\/b<\/code>\u00a0\u2013 move page up.<\/li>\n<li><code>PgDown\/f<\/code>\u00a0\u2013 move page down.<\/li>\n<\/ul>\n<p>The following are chkservice action keys:<\/p>\n<ul>\n<li><code>r<\/code>\u00a0\u2013 updates or reload information.<\/li>\n<li><code>Space bar<\/code>\u00a0\u2013 used to enable or disable a unit.<\/li>\n<li><code>s<\/code>\u00a0\u2013 for starting or stopping a unit.<\/li>\n<li><code>q<\/code>\u00a0\u2013 exit.<\/li>\n<\/ul>\n<p>To view the help page as shown in the screenshot below, use\u00a0<code>?<\/code>\u00a0(press\u00a0<code>[Shift + \/]<\/code>).<\/p>\n<div id=\"attachment_27334\" class=\"wp-caption aligncenter\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-27334\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/09\/Chkservice-Help-Options.png\" sizes=\"auto, (max-width: 1082px) 100vw, 1082px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/09\/Chkservice-Help-Options.png 1082w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/09\/Chkservice-Help-Options-768x433.png 768w\" alt=\"Chkservice Help and Options\" width=\"1082\" height=\"610\" aria-describedby=\"caption-attachment-27334\" data-lazy-loaded=\"true\" \/><\/p>\n<p id=\"caption-attachment-27334\" class=\"wp-caption-text\">Chkservice Help and Options<\/p>\n<\/div>\n<p>chkservice Github repository:\u00a0<a href=\"https:\/\/github.com\/linuxenko\/chkservice\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/github.com\/linuxenko\/chkservice<\/a><\/p>\n<p>You may also like to read these systemd related articles.<\/p>\n<ol>\n<li><a href=\"https:\/\/www.tecmint.com\/create-new-service-units-in-systemd\/\" target=\"_blank\" rel=\"noopener\">How to Create and Run New Service Units in Systemd Using Shell Script<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/linux-boot-process-and-manage-services\/\" target=\"_blank\" rel=\"noopener\">Managing System Startup Process and Services (SysVinit, Systemd and Upstart)<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/manage-systemd-logs-using-journalctl\/\" target=\"_blank\" rel=\"noopener\">Manage Log Messages Under Systemd Using Journalctl<\/a><\/li>\n<li><a href=\"https:\/\/www.tecmint.com\/change-runlevels-targets-in-systemd\/\" target=\"_blank\" rel=\"noopener\">How to Change Runlevels (targets) in SystemD<\/a><\/li>\n<\/ol>\n<p>That\u2019s it! If you encountered any errors during installation or want to ask questions, share any thoughts, use the comment form below.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/chkservice-manage-systemd-units-in-terminal\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Systemd\u00a0(system daemon) is a modern system management daemon for Linux systems. Systemd is a\u00a0replacement for init system manager; it controls system startup and services, and introduces the idea of units (managed via unit files) to identify different types of system resources such as services, devices, swap, automount, targets, paths, sockets and others. It ships in &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/03\/28\/chkservice-an-easy-way-to-manage-systemd-units-in-terminal\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Chkservice \u2013 An Easy Way to Manage Systemd Units in Terminal&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12791","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=12791"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12791\/revisions"}],"predecessor-version":[{"id":12792,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/12791\/revisions\/12792"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=12791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=12791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=12791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}