Written by James McDonald

October 26, 2011

Fedora 16 take a bow…

Gnome 3 makes me feel like I own an Apple. I feel really smart and stylish using it.

Even better is the bump from the 2.* series kernels up to 3.

However progress means change and for years I’ve been comfortable with chkconfig –list to display and manage my SysV services

Enter systemd

How do I list my services now that chkconfig has been replaced by systemctl?

ls /lib/systemd/system/*.service /etc/systemd/system/*.service
systemctl list-units --all # this doesn't seem to list all the *.services

How do I start/stop, enable/disable systemd services?


Does the service exist

# firstly does the service exist
# command split over multiple lines for readability
[root@mybox ~]# ls /lib/systemd/system/*.service \
/etc/systemd/system/*.service \
| grep -i nx
# output

Enable a Service

# enable it
[root@mybox ~]# systemctl enable freenx-server.service
#output follows
ln -s '/lib/systemd/system/freenx-server.service' \

Start a Service

# start it 
[root@mybox ~]# systemctl start freenx-server.service 
[root@mybox ~]# ps -ef | grep -i nx 
root 9209 8936 0 11:09 pts/2 00:00:00 grep --color=auto -i nx

Check the Status

[root@mybox ~]# systemctl status freenx-server.service 
freenx-server.service - FreeNX Server Loaded: loaded 
(/lib/systemd/system/freenx-server.service; enabled) 
Active: active (exited) since Wed, 26 Oct 2011 11:07:55 +1100; 27s ago 
Process: 9131 ExecStart=/usr/libexec/nx/nxserver --start (code=exited, status=0/SUCCESS) 
Process: 9052 ExecStartPre=/usr/libexec/nx/nxserver --cleanup (code=exited, status=1/FAILURE) 
CGroup: name=systemd:/system/freenx-server.service # ooh it's not working why?


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…