CentOS 7 / RHEL 7 systemd commands

Rob —  July 29, 2014 — 2 Comments

By now, if you’ve played around with CentOS 7 (or RHEL 7), you’ve heard that there are now systemd commands you can start using to start, restart and stop various services. They still have the ‘service’ command included for backwards compatibility, but that may go away in future releases. Here’s a little tutorial to help you learn the systemd commands!

Ok, so you’re on your new CentOS 7 (or RHEL 7) system (we’ll just call it CentOS 7 for now to make it easier) and you restarted sshd with the old/familiar ‘service sshd restart’ command and you’re met with this: Redirecting to /bin/systemctl restart sshd.service

Now, it still restarted it, but that little note is annoying. It’s basically telling you “hey – things have changed… use systemctl now!”

You could now type ‘systemctl restart sshd’ for a shorter version.. here are some examples:

Stop service:

Start service:

Restart service (stops/starts):

Reload service (reloads config file):

List status of service:

What about chkconfig? That changed too? Yes, now you want to use systemctl for the chkconfig commands also..

chkconfig service on:

chkconfig service off:

chkconfig service (is it set up to start?)

chkconfig –list (shows what is and isn’t enabled)

Related posts from Linux Brigade!

  • Download CentOS 7 Nightly BuildsDownload CentOS 7 Nightly Builds As the CentOS folks are working on releasing a final version of CentOS 7, you can get in on the action and download their nightly builds. We’re estimating (guessing? Based on previous […]
  • CentOS 7 / RHEL 7 – Open portsCentOS 7 / RHEL 7 – Open ports One of the most common things I do on Linux machines is open ports to test software in a development environment.  In the past, that meant trying to remember (and Googling) cryptic […]
  • How to use GNU Screen in LinuxHow to use GNU Screen in Linux Screen is billed as a “full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells)” (from the man page). Linux admins use […]
  • Migrate mail from one server to another with imapsyncMigrate mail from one server to another with imapsync Have you been in the situation where you needed to move everyone’s mail from one provider to another?  It’s a pain to do using the mail client one at a time, but with this guide, you’ll be […]
  • Easily increase storage size with LVMEasily increase storage size with LVM Your server needs more space eh? Throw another physical drive in there and let’s use that to increase the logical volume that needs more space! In this example, we are going to use a […]

Trackbacks and Pingbacks:

  1. List Buat Artikel | Warkirasep - March 4, 2015

    […] enable service on startup linux centos 7 http://www.linuxbrigade.com/centos-7-rhel-7-systemd-commands/ […]

  2. RHEL 7 / CentOS 7 servis start, stop ve restart komutları | rootyetkisi – Biri Linux mu dedi? - March 15, 2015

    […] makaleyi oluşturmak için kullandığım kaynak adreslere buradan ve buradan […]

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url=""> 

*