Skip to main content
17 votes

How to use the `$HOME` environment variable in systemd service files

The full list of supported variables (called "Specifiers") is here: https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Specifiers. There is no specifier for the home directory of user ...
pR0Ps's user avatar
  • 305
8 votes

Best way to disable swap in Linux

On Raspbian 10 (Buster), the clean answer would be: To disable it until the next reboot, as stated in */etc/fstab*: sudo /sbin/dphys-swapfile swapoff To disable swap on boot: sudo systemctl disable ...
Michaël GENAY's user avatar
6 votes

How to use the `$HOME` environment variable in systemd service files

So, as the absence of practical examples in combination with comments makes a feeling like %h doesn't work (it does actually), here's a full example of a service that starts from HOME dir without ...
Hi-Angel's user avatar
  • 436
3 votes

runit - unable to open supervise/ok: file does not exist

If you are running ubuntu 18.04 or higher and getting the following error unable to open supervise/ok: file does not exist or if the runsvdir is not showing up in "grep" output then please runit-...
Kumaran's user avatar
  • 151
2 votes

Why is technically possible for init to be a shell script?

A shell based rootfs switch is typically via exec switch_root because exec does not fork. Preserves the assumption of PID 1 is init. This being Linux, of course that's far from the only way to do ...
John Mahowald's user avatar
2 votes

Best way to disable swap in Linux

On my Linux Mint box (version 19.3 (Tricia), based on Ubuntu 18.04 (Bionic Beaver)) without a swap partition or without any swap at all, systemctl reported that swapfile.swap failed during every ...
piotao's user avatar
  • 121
1 vote

Run custom s6 script in docker container once only

My solution, assuming s6's services in the container are located at /etc/s6/: docker-compose.yml: volumes: - ./data:/data # a mapped or named volume - ./run:/etc/s6/custom/run:ro ...
lonix's user avatar
  • 1,139
1 vote

How to use the `$HOME` environment variable in systemd service files

You could use WorkingDirectory=~ and set relative paths.
crabvk's user avatar
  • 31
1 vote

Best way to disable swap in Linux

While it doesn't directly solve the author's issue, the comments have evolved into a useful compilation of methods to eliminate swap in various scenarios. As a contribution, I've included one more ...
petr's user avatar
  • 121
1 vote

How to list services/daemons started at boot _and_ check their loading order

systemd On distros using systemd, you can control the order. You have to use a combination of Requires with Before/After. Due to the parallel and relationships among services, the service start-up ...
Pablo A's user avatar
  • 210
1 vote

svnserve init.d script

now-a-days it should be so simple (if only svnserve came with it; I'm using v1.9.5 currently): sudo systemctl enable svnserve sudo systemctl daemon-reload but /etc/init.d/svnserve still works for ...
S Hunter Simpson's user avatar
1 vote

Ubuntu - dhcp server 'not configured to listen on any interfaces'

I had a secondary IP address configured for migrating from old subnet to new subnet. I was getting the same Not configured to listen on any interfaces! error. After finding this post I changed /etc/...
skeetastax's user avatar
1 vote

Ubuntu - dhcp server 'not configured to listen on any interfaces'

I meet the error, such as "No subnet declaration for eth1" and "Not configured to listen on any interfaces!". Then I add the eth1 subnet declaration in the dhcpd.conf although the subnet not lease ...
VictorLee's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible