AnswerBun.com

What is the systemctl equivalent

I am converting a package from .rpm to .deb using this tutorial. However, to test and debug the application I need to run it. The programs readme explains to run it as a service with:

systemctl enable progname.service
systemctl start progname.service

What is the equivalent on ubuntu for these commands?

Ask Ubuntu Asked by Marnaw on December 8, 2021

3 Answers

3 Answers

Ubuntu is currently planning/developing to use systemd in the future. See following links for info: Vivid will switch to booting with systemd... and Release notes: Boot and service management

I am using 14.04.

You can use the more native command update-rc.d. Check the man page.

Enabling a service with defaults (see man page):

sudo update-rc.d foo_service defaults

Disabling a service:

sudo update-rc.d foo_service remove

Note that in order to remove without error message the foo_service file must not be present. However you can force:

sudo update-rc.d -f foo_service remove

Answered by Ely on December 8, 2021

Default package on 14.04 is systemd-services that doesn't provides the systemdctl command.

Read

You must read the article How To Install And Test Systemd On Ubuntu 14.04 Trusty Tahr And Ubuntu 12.04 Precise Pangolin if you want to use systemd.

Pitti PPA

There is a PPA ppa:pitti/systemd that provide the adequate package for LTS 12.04, 14.04 and upcoming.

Answered by Édouard Lopez on December 8, 2021

systemctl is the control utility for systemd:

http://www.freedesktop.org/software/systemd/man/systemctl.html

Note that Ubuntu doesn't use systemd, it uses upstart, which does a few of the same things in principle, but has some different concepts.

Without much knowledge about systemd, and based on what I read in the document I posted, I think you don't need to "enable" a service. Just dropping the .conf file for your service in /etc/init should make upstart aware of it.

That's the crux of the matter, though: the systemd config file for your service won't work unmodified on Ubuntu, you have to "translate" that to an equivalent version for Upstart. Here's documentation for upstart:

http://upstart.ubuntu.com/cookbook/

Once you have a suitable upstart .conf file, you can start a service (equivalent, I think, to systemctl start) using:

start your-service

Answered by roadmr on December 8, 2021

Add your own answers!

Related Questions

Install Ubuntu Server 20 on NVMe M.2 Dell Precision T5610

0  Asked on December 3, 2021 by dale-nelson

       

Nginx 502 Bad Gateway Ubuntu 20.04, php 7.4

0  Asked on December 3, 2021

 

How do you find libraries (C++) in Ubuntu?

2  Asked on December 1, 2021 by bora-george

   

Upgrade to 20.04 from 18.04 GRUB menu hidden

2  Asked on December 1, 2021 by mesvre

         

Ubuntu 20.04 Automatic Login Not Working Consistently

2  Asked on December 1, 2021 by bob-reed

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.