Category Archives: ubuntu

linux systemd common commands using systemctl

I first used slackware Linux in the early 90s, possibly, and have used Linux quite extensively since then.

The init/service management has changed a lot over that time, from editing /etc/rc.d now to systemd. I have struggled to keep up. So here is a terse set of commands to help me when I come to add or manage services on a Linux box that uses systemd

List all the systemd units ( no need to run as root )


List all systemd units, type that have exited

systemctl list-units –type=service –all –state=exited

Show the status of a unit ( you can start, stop, restart, refresh instead of status )

sudo systemctl status owfs

To add a unit:

There seems to be two places that the systemd UNIT files exist.

System installed files are in /lib/systemd/system

User installed files are in /etc/systemd/system

..and there are sometimes symlinks from one to another

to create a new systemd unit called j2

sudo systemctl edit j2.service –force

UNIT file layout

Description=1-wire filesystem FUSE mount

ExecStart=/usr/bin/owfs -c /etc/owfs.conf –allow_other %t/owfs
ExecStop=/usr/bin/umount %t/owfs


Enabling your new systemd unit

sudo systemctl enable j2

Installing WordPress

Well, it has been a bit of a bumpy ride for no good reason. Jennifer and I have decided to move our web presence over to wordpress from plain old html/css. To be honest, none of our web pages have been updated for ages. Install WP on our new Ubuntu server ( a VM hosted at Mythic Beasts ) seemed a good and easy idea. I wanted to go with the Ubuntu apt-get install default installation as it should be tried , tested and stable especially using Unbuntu 12.04.

We could not get images uploaded and displayed. I might be the htacces file, misconfiguration in the settings, permissions. We tried a lot of things including upgrading to 14.04LTS.

Jennifer has managed to get WP to display uploaded images using symlinks, but this is not the solution. We have a few other options to try :
1) apt-get remove? wordpress, then install the latest from source from the WP site.
2) hack permalinks. It might help.
3) ask on the WP formums ( there are currently a lot of questions like this )