TransWikia.com

Systemctl failure using --global setting

Ask Ubuntu Asked by Mark Knittel on December 5, 2021

I’m running Ubuntu 16.04 (using KDE desktop). I’m trying to set a systemd service to run globally using the

sudo systemctl --user --global enable *service*

command. It fails with

No such file or directory 

However, when I execute

systemctl enable *service*

the command works with no errors.

What do I need to do to get the --global setting to work?

One Answer

To make your service available for all user you have to put the script into the /lib/systemd/user directory.

It makes no sense to set --user and --global at the same time. Just run

sudo systemctl --global enable *service*

to enable the service globally.

Answered by abu_bua on December 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP