{"id":2213,"date":"2016-01-30T17:42:22","date_gmt":"2016-01-30T08:42:22","guid":{"rendered":"http:\/\/www.catracing.org\/hendrb\/?p=2213"},"modified":"2016-01-30T17:43:44","modified_gmt":"2016-01-30T08:43:44","slug":"centos-7-managing-services-using-systemctl","status":"publish","type":"post","link":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/","title":{"rendered":"CENTOS 7 &#8211; Managing Services Using Systemctl"},"content":{"rendered":"<h1><span style=\"color: #ffff00;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-37 size-full\" src=\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2014\/05\/Blog-Centos.png\" alt=\"Blog - Centos\" width=\"250\" height=\"250\" srcset=\"https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2014\/05\/Blog-Centos.png 250w, https:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2014\/05\/Blog-Centos-150x150.png 150w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/span><\/h1>\n<h1 style=\"text-align: center;\"><span style=\"color: #ffff00;\">CENTos 7 &#8211; Using Systemctl<\/span><\/h1>\n<p>For this months technical blog\u00a0thought I would share another difference between previous versions of the operating system.\u00a0 Which is very different and can be very confusing for those of us used to the older \u2018unix\u2019 way of doing things.\u00a0 RHEL 7, and therefor CENTos 7 have done away with the init.d method of boot scripts and starting and stopping services.\u00a0 The OS now uses systemd (Similar to Apple\u2019s launchd in OSX).\u00a0 I will not be delving into the nuts and bolts of what systemd is, and how it works.\u00a0 This is a simple run down of the commands you need to know to start, stop, and restart services using systemctl.\u00a0 Additionally I will also cover systemd\u2019s equivalent to runlevels, and how to change and set your systems default environment during boot.<\/p>\n<h2><span style=\"color: #0000ff;\">Starting, Stopping, and Restarting Services.<\/span><\/h2>\n<p>In this article I assume that you are following best practices by logging in with a standard user account and evelating your privileges using sudo. If you are not, simply ignore the sudo command.<\/p>\n<h2><span style=\"color: #0000ff;\">Starting a service.<\/span><\/h2>\n<p>Using init.d unix and Linux system, to start a service we would use the service command, which would execute it\u2019s specific startup script. Whereas in CENTos 7 you would use systemctl.<\/p>\n<h3><span style=\"color: #00ccff;\">Previous verions of CENTos \u2013<\/span><\/h3>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo service &lt;service name&gt; start<\/span><\/p>\n<h3><span style=\"color: #00ccff;\">CENTos 7 &#8211;<\/span><\/h3>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo systemctl start &lt;service name&gt;<\/span><\/p>\n<h2><span style=\"color: #0000ff;\">Stopping a service.<\/span><\/h2>\n<h3><\/h3>\n<h3><span style=\"color: #00ccff;\">Previous versions of CENTos \u2013<\/span><\/h3>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo service &lt;service name&gt; stop<\/span><\/p>\n<h3><span style=\"color: #00ccff;\">CENTos 7 &#8211;<\/span><\/h3>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo systemctl stop &lt;service name&gt;<\/span><\/p>\n<h2><span style=\"color: #0000ff;\">Restarting a service.<\/span><\/h2>\n<h3><span style=\"color: #00ccff;\">Previous versions of CENTos &#8211;<\/span><\/h3>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo service &lt;service name&gt; restart<\/span><\/p>\n<h3><span style=\"color: #00ccff;\">CENTos 7 &#8211;<\/span><\/h3>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo systemctl restart &lt;service name&gt;<\/span><\/p>\n<p>This should all look pretty straight forward, you mostly just have to remember the new systemctl command, and the fact that you now place the action before service name.<\/p>\n<h2><span style=\"color: #3366ff;\">Configuring boot services,<\/span><\/h2>\n<p>So how do we go about configuring which services are started at boot? With init.d you could either modify your init scripts for a specific runlevel, in the rc.d directory, or use a command called chkconfig which would handle it for you.<\/p>\n<h3><span style=\"color: #00ccff;\">Previous versions of CENTos \u2013<\/span><\/h3>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0sudo chkconfig \u2013list sshd<\/span><\/p>\n<p><span style=\"color: #ff0000;\">\u00a0\u00a0\u00a0 <em>sshd\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0:off\u00a0\u00a0\u00a0\u00a0\u00a0 1:off\u00a0\u00a0\u00a0\u00a0\u00a0 2:on\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3:on\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 4:on\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 5:on\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 6:off<\/em><\/span><\/p>\n<p><em>\u00a0<\/em>This\u00a0shows us that the ssd service\u00a0is either\u00a0on or\u00a0off in each corresponding runlevel. For instance runlevel 1 (Single User Mode), sshd is off at boot, however with run level (consoleonly, with networking services), sshd is on at boot.\u00a0 I do find it interesting that sshd is configured to be on in runlevel 2 (Console only, no networking.)<\/p>\n<p>You could easily toggle a specific service either on or off for each service with the following command.<\/p>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo chkconfig &lt;service&gt; &#8211;level &lt;runlevels&gt;<\/span><\/p>\n<p>Full example given below.<\/p>\n<p><span style=\"color: #ffff00;\"><em>\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo chkconfig sshd \u2013level 35<\/em><\/span><\/p>\n<p>This would in effect, toggle the sshd service to be started at boot in both run revel 3 (Multi-User, with networking, in console mode.), and runlevel 5 (Multi-User, with networking, in Graphical Environment Mode (XWindows).<\/p>\n<h3><span style=\"color: #00ccff;\">CENTos 7 &#8211; <\/span><\/h3>\n<p>In CENTos 7, You no longer have runlevels, so you only need to worry about a service being on or off (Or enabled or disabled), again using the systemctl command.<\/p>\n<p>To configure a service to be started at boot.<\/p>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 systemctl enable &lt;service name&gt;<\/span><\/p>\n<p>Full example given below. Using the secure shell daemon.<\/p>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo systemctl enable sshd<\/span><\/p>\n<p>To no longer have a service started at boot.<\/p>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 systemctl disble &lt;service name&gt;<\/span><\/p>\n<p>Full example given below, Using the secure shell daemon.<\/p>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo systectl disable sshd<\/span><\/p>\n<h2><span style=\"color: #0000ff;\">Displaying a list of running services.<\/span><\/h2>\n<p>You can get the status of the running services or a single service by the following 2 methods.<span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><\/p>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0systemctl status<\/span><\/p>\n<p>Will return the status of every running service, and its dependents.<\/p>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 systemctl status &lt;service&gt;<\/span><\/p>\n<p>Will display the status of an individual service (such as winbind shown here).<\/p>\n<p><span style=\"color: #ff0000;\">\u251c\u2500winbind.service<\/span><br \/>\n<span style=\"color: #ff0000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u2502 \u251c\u250017859 \/usr\/sbin\/winbindd<\/span><br \/>\n<span style=\"color: #ff0000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u2502 \u251c\u250017998 \/usr\/sbin\/winbindd<\/span><br \/>\n<span style=\"color: #ff0000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u2502 \u251c\u250019090 \/usr\/sbin\/winbindd<\/span><br \/>\n<span style=\"color: #ff0000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u2502 \u251c\u250019398 \/usr\/sbin\/winbindd<\/span><br \/>\n<span style=\"color: #ff0000;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u2502 \u2514\u250019854 \/usr\/sbin\/winbindd<\/span><\/p>\n<p>The last bit I will demonstrate with system control is how to switch between a console (Command Line) environment, and how to set the default runrevel.<br \/>\nFirst let\u2019s find out what runlevel we are current using.<\/p>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo systemctl get-default<\/span><\/p>\n<p><span style=\"color: #ffffff;\">The system will return the current target mode<\/span><\/p>\n<p><span style=\"color: #ff0000;\">multi-user.target<\/span><\/p>\n<p>This is the old runrevel 3, (command line, multi user with networking).<br \/>\nSo let\u2019s say we wanted to switch to the old runlevel 5 \u201cMultiuser, Networking, with Xwindows\u201d<\/p>\n<p>We can have centOS return a list of available \u201cTARGETS\u201d (runlevels), You do not need to run this command as root, so no sudo is necessary.<br \/>\n<span style=\"color: #ffff00;\"><br \/>\nsystemctl list-units \u2013t target -a<\/span><\/p>\n<p>UNIT LOAD\u00a0\u00a0\u00a0\u00a0\u00a0 ACTIVE\u00a0\u00a0 SUB\u00a0\u00a0\u00a0 DESCRIPTION<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 active\u00a0\u00a0 active Basic System<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 active\u00a0\u00a0 active Encrypted Volumes<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 inactive dead\u00a0\u00a0 Emergency Mode<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 inactive dead\u00a0\u00a0 Final Step<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 active\u00a0\u00a0 active Login Prompt<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 inactive dead\u00a0\u00a0 Graphical Interface<br \/>\nlocal-fs-pre.target\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 active\u00a0\u00a0 active Local File Systems (Pre)<br \/>\nlocal-fs.target\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 active\u00a0\u00a0 active Local File Systems<br \/>\nmulti-user.target\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 active\u00a0\u00a0 active Multi-User System<br \/>\nnetwork-online.target\u00a0 loaded\u00a0\u00a0\u00a0 active\u00a0\u00a0 active Network is Online<br \/>\nnetwork-pre.target\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 inactive dead\u00a0\u00a0 Network (Pre)<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 active\u00a0\u00a0 active Network<br \/>\nnss-lookup.target\u00a0\u00a0\u00a0\u00a0\u00a0 loaded \u00a0inactive dead\u00a0\u00a0 Host and Network Name Lookups<br \/>\nnss-user-lookup.target loaded\u00a0\u00a0\u00a0 inactive dead\u00a0\u00a0 User and Group Name Lookups<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 active\u00a0\u00a0 active Paths<br \/>\nremote-fs-pre.target\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 inactive dead\u00a0\u00a0 Remote File Systems (Pre)<br \/>\nremote-fs.target\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 active\u00a0\u00a0 active Remote File System<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 inactive dead\u00a0\u00a0 Rescue Mode<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 inactive dead\u00a0\u00a0 Shutdown<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 active\u00a0\u00a0 active Slices<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 active\u00a0\u00a0 active Sockets<br \/>\ntarget\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 loaded\u00a0\u00a0\u00a0 active\u00a0\u00a0 active Sound Card<\/p>\n<p>For the old runlevel 5, (Xwindows, Multi-User, With Networking) we would issue the following command. As this will manipulate services, we must run this as root.<br \/>\n<span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo systemctl isolate graphical.target<\/span><\/p>\n<p>To switch back to runlevel 3\u00a0 \u2018multi-user target&#8217;<br \/>\n<span style=\"color: #ffff00;\">sudo systemctl isolate multiuser.target<\/span><\/p>\n<p>Now that we can switch between targets \u201cRunlevels\u201d let\u2019s set one as a default.<\/p>\n<p>Remember we mentioned in the beginning of the blog that CentOS 7 now uses systemd and not init.d to control the boot process. Systemd uses a symbolic link to determine the systems default target\u201d\u00a0 If you do an ls-l or ll on \/etc\/systemd\/system, you can determine the systems default target.<br \/>\n<span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0ll \/etc\/systemd\/system<\/span><\/p>\n<ul>\n<li><span style=\"color: #ff0000;\">1 root root 41 Jan\u00a0 4 04:20 default.target -&gt; \/usr\/lib\/systemd\/system\/multi-user.target<\/span><\/li>\n<\/ul>\n<p>First we must remove the symbolic link<\/p>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo rm\/etc\/systemd\/system\/default.target<\/span><\/p>\n<p><span style=\"color: #ffffff;\">Now we create a new symbolic link to the &#8216;graphical.tartarget&#8217;<\/span><\/p>\n<p><span style=\"color: #ffff00;\">sudo ln-sf \/lib\/systemd\/system\/graphical.target \/etc\/systemd\/system\/default.target<\/span><\/p>\n<p>Before we reboot the system, let\u2019s make sure the default target symbolic link was correctly set.<\/p>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ll \/etc\/systemd\/system\/<\/span><\/p>\n<p>We should now see this<\/p>\n<h5><span style=\"color: #ffff00;\">lrwxrwxrwx 1 root root\u00a0\u00a0 36 Jan 23 11:13 default.target &#8211; \/lib\/systemd\/system\/graphical.target<\/span><\/h5>\n<p>Let\u2019s go ahead and reboot the system, and it should now boot into the GUI (XWindows<span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><\/p>\n<p><span style=\"color: #ffff00;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sudo reboot<\/span><\/p>\n<p>To return the system to boot into a multi-user console with networking, repeat the steps above, substituting &#8216;multi-user.target&#8217; in place of graphical.target.\u00a0 Like this.<\/p>\n<p><span style=\"color: #ffff00;\">sudo ln-sf \/lib\/systemd\/system\/multi-user\/target \/etc\/systemd\/system\/default.target<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>You should now have a better grasp on how to control services, and your default run level using CentOS 7.<\/p>\n<p>I hope you enjoyed this month\u2019s technical blog, and will continue to return for more exciting and informative articles. All comments are welcome.<\/p>\n<p>DISCLAIMER: While we strive to bring you the most accurate information, use these commands at your own risk.\u00a0 Neither the authors nor Brent\u2019s World are responsible for any damage, or loss of data, nor loss of revenue resulting in downtime, either expected or unexpected that may occur by using the commands outlined in this blog.\u00a0 It is recommended that these commands or scripts be executed in a test environment (Preferably on a virtual machine, not connected to an active network), until you fully understand the actions being performed by the commands or scripts.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CENTos 7 &#8211; Using Systemctl For this months technical blog\u00a0thought I would share another difference between previous versions of the operating system.\u00a0 Which is very different and can be very confusing for those of us used to the older \u2018unix\u2019 <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[],"class_list":["post-2213","post","type-post","status-publish","format-standard","hentry","category-technical"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>CENTOS 7 - Managing Services Using Systemctl - Brent&#039;s World<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CENTOS 7 - Managing Services Using Systemctl - Brent&#039;s World\" \/>\n<meta property=\"og:description\" content=\"CENTos 7 &#8211; Using Systemctl For this months technical blog\u00a0thought I would share another difference between previous versions of the operating system.\u00a0 Which is very different and can be very confusing for those of us used to the older \u2018unix\u2019 &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/\" \/>\n<meta property=\"og:site_name\" content=\"Brent&#039;s World\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Brents-World-912767498915017\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/Brents-World-912767498915017\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-30T08:42:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-01-30T08:43:44+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2014\/05\/Blog-Centos.png\" \/>\n<meta name=\"author\" content=\"Brent Hendricks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brent Hendricks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/\"},\"author\":{\"name\":\"Brent Hendricks\",\"@id\":\"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442\"},\"headline\":\"CENTOS 7 &#8211; Managing Services Using Systemctl\",\"datePublished\":\"2016-01-30T08:42:22+00:00\",\"dateModified\":\"2016-01-30T08:43:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/\"},\"wordCount\":1318,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442\"},\"image\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2014\/05\/Blog-Centos.png\",\"articleSection\":[\"Technical\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/\",\"url\":\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/\",\"name\":\"CENTOS 7 - Managing Services Using Systemctl - Brent&#039;s World\",\"isPartOf\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2014\/05\/Blog-Centos.png\",\"datePublished\":\"2016-01-30T08:42:22+00:00\",\"dateModified\":\"2016-01-30T08:43:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#primaryimage\",\"url\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2014\/05\/Blog-Centos.png\",\"contentUrl\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2014\/05\/Blog-Centos.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.catracing.org\/hendrb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CENTOS 7 &#8211; Managing Services Using Systemctl\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.catracing.org\/hendrb\/#website\",\"url\":\"https:\/\/www.catracing.org\/hendrb\/\",\"name\":\"Brent&#039;s World\",\"description\":\"Your weekly dose of the life of Brent!\",\"publisher\":{\"@id\":\"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.catracing.org\/hendrb\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442\",\"name\":\"Brent Hendricks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg\",\"url\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg\",\"contentUrl\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg\",\"width\":4480,\"height\":6720,\"caption\":\"Brent Hendricks\"},\"logo\":{\"@id\":\"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg\"},\"sameAs\":[\"http:\/\/www.catracing.org\",\"https:\/\/www.facebook.com\/Brents-World-912767498915017\"],\"url\":\"https:\/\/www.catracing.org\/hendrb\/author\/hendrb01\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CENTOS 7 - Managing Services Using Systemctl - Brent&#039;s World","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/","og_locale":"en_US","og_type":"article","og_title":"CENTOS 7 - Managing Services Using Systemctl - Brent&#039;s World","og_description":"CENTos 7 &#8211; Using Systemctl For this months technical blog\u00a0thought I would share another difference between previous versions of the operating system.\u00a0 Which is very different and can be very confusing for those of us used to the older \u2018unix\u2019 &hellip; Continue reading &rarr;","og_url":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/","og_site_name":"Brent&#039;s World","article_publisher":"https:\/\/www.facebook.com\/Brents-World-912767498915017","article_author":"https:\/\/www.facebook.com\/Brents-World-912767498915017","article_published_time":"2016-01-30T08:42:22+00:00","article_modified_time":"2016-01-30T08:43:44+00:00","og_image":[{"url":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2014\/05\/Blog-Centos.png","type":"","width":"","height":""}],"author":"Brent Hendricks","twitter_misc":{"Written by":"Brent Hendricks","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#article","isPartOf":{"@id":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/"},"author":{"name":"Brent Hendricks","@id":"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442"},"headline":"CENTOS 7 &#8211; Managing Services Using Systemctl","datePublished":"2016-01-30T08:42:22+00:00","dateModified":"2016-01-30T08:43:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/"},"wordCount":1318,"commentCount":0,"publisher":{"@id":"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442"},"image":{"@id":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#primaryimage"},"thumbnailUrl":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2014\/05\/Blog-Centos.png","articleSection":["Technical"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/","url":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/","name":"CENTOS 7 - Managing Services Using Systemctl - Brent&#039;s World","isPartOf":{"@id":"https:\/\/www.catracing.org\/hendrb\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#primaryimage"},"image":{"@id":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#primaryimage"},"thumbnailUrl":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2014\/05\/Blog-Centos.png","datePublished":"2016-01-30T08:42:22+00:00","dateModified":"2016-01-30T08:43:44+00:00","breadcrumb":{"@id":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#primaryimage","url":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2014\/05\/Blog-Centos.png","contentUrl":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2014\/05\/Blog-Centos.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.catracing.org\/hendrb\/centos-7-managing-services-using-systemctl\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.catracing.org\/hendrb\/"},{"@type":"ListItem","position":2,"name":"CENTOS 7 &#8211; Managing Services Using Systemctl"}]},{"@type":"WebSite","@id":"https:\/\/www.catracing.org\/hendrb\/#website","url":"https:\/\/www.catracing.org\/hendrb\/","name":"Brent&#039;s World","description":"Your weekly dose of the life of Brent!","publisher":{"@id":"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.catracing.org\/hendrb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.catracing.org\/hendrb\/#\/schema\/person\/abd5b294207e782562c7bb51e0a9e442","name":"Brent Hendricks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg","url":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg","contentUrl":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg","width":4480,"height":6720,"caption":"Brent Hendricks"},"logo":{"@id":"http:\/\/www.catracing.org\/hendrb\/wp-content\/uploads\/2019\/05\/Brent-Sitting-portrait-2.jpg"},"sameAs":["http:\/\/www.catracing.org","https:\/\/www.facebook.com\/Brents-World-912767498915017"],"url":"https:\/\/www.catracing.org\/hendrb\/author\/hendrb01\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p43ojH-zH","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/posts\/2213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/comments?post=2213"}],"version-history":[{"count":0,"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/posts\/2213\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/media?parent=2213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/categories?post=2213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.catracing.org\/hendrb\/wp-json\/wp\/v2\/tags?post=2213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}