systemd ain’t kissing well…

The Unix philosophy – simple and beautiful (so it “just works”)

systemd started with the promise to “unite” startup management across distributions, 3 years later: yep would say mission accomplished.

“One of systemd’s main goals is to unify basic Linux configurations and service behaviors across all distributions.[6]

“one startup system to rule them all”

standardization is important it gives efficiency, but biodiversity is also important, it gives resilience. (system A might be vulnerable to an exploit, but system B not, because it is an entirely different system X-D)

but it does way more than that…

“Systemd includes features like on-demand starting of daemons, snapshot support, process tracking[29] and Inhibitor Locks.[30] It is not just the name of the init daemon but also refers to the entire software bundle around it, which, in addition to the systemd init daemon, includes the daemons journald, logind and networkd, and many other low-level components. In January 2013, Poettering described systemd not as one program, but rather a large software suite that includes 69 individual binaries.[31]

Original author(s) Lennart Poettering[1]
Developer(s) Red Hat (Lennart Poettering, Kay Sievers, Harald Hoyer, Daniel Mack, Tom Gundersen, David Herrmann)[2] 345 different authors at 2018 and 1,317 different authors in total[3]
Initial release 30 March 2010; 10 years ago
Stable release 245 (March 6, 2020; 3 months ago) [±][4]
Repository

Edit this at Wikidata

Written in C
Operating system Linux
Type System software
Process supervisor
License LGPLv2.1+[5]
Website systemd.io

“In May 2011 Fedora became the first major Linux distribution to enable systemd by default.[11] Between October 2013 and February 2014, a long debate among the Debian Technical Committee occurred on the Debian mailing list,[12] discussing which init system to use as the default in Debian 8 “jessie”, and culminating in a decision in favor of systemd. The debate was widely publicized[13][14] and in the wake of the decision the debate continues on the Debian mailing list. In February 2014, after Debian’s decision was made, Mark Shuttleworth announced on his blog that Ubuntu would follow in implementing systemd.[15][16]”

“In November 2014 Debian Developer Joey Hess,[17]

Debian Technical Committee members Russ Allbery[18] and Ian Jackson,[19] and systemd package-maintainer Tollef Fog Heen[20] resigned from their positions.

All four justified their decision on the public Debian mailing list and in personal blogs with their exposure to extraordinary stress-levels related to ongoing disputes on systemd integration within the Debian and open-source community that rendered regular maintenance virtually impossible.”

src: https://en.wikipedia.org/wiki/Systemd

SysVinit -> systemd

security problems: non-root to root escalation: https://www.heise.de/security/meldung/System-Down-Drei-Uralt-Luecken-in-Systemd-vereinfachen-Linux-Angriffe-4270673.html

people hate updates/changes – because it interrupts their workflows – it also causes stress – because it takes energy and time to learn and adapt new methologies (short for methodologies 😉 (which might in return make their workflows even better… faster… efficient… because computer are now starting/rebooting faster… less wait)

important of course:

  • that it is an actual improvement over other systems in terms of
    • security
    • speed
    • usability
    • unity
  • simplicity is key, this is where systemd kind of fails X-D

maybe they also will have to rewrite 10.000 script files… argh 😀

therefore as far as i have learned – systemd is implementing new features while at the same time trying to stay SysVinit “runlevel” backward-compatible.

Even if the update makes things like 1000x times better than what you had before 😀 … checkout the banking/FinTECH sector is running WinXP on ATMs… as long as they possible can… and even on nuclear submarines. ( i just hope they don’t hook it up to “THE INTERNET”)

Even Linus Torvalds said – if there were not new hardware every year – we had nothing to do 😀

i don’t think so – there is always plenty of work – but keeping a good work-life balance is key – or your family might stay angry for 10 years

Actually – what do you need more than the speed of an intel i5 quadcore with 8GByte of RAM? Especially … if you DO NOT NEED the latest Windows. Because you are on (Universal – run everywhere – Debian) Linux.

so i predict – also with hardware – some market-saturation is taking place (can already be seen – desktop PC in decline – laptop still in use – but people try to do as much as they can on their touchable-wearable-mobile mini-smart-phone-laptop without keyboard… typing long texts like these just suck without a keyboard)

but well… nowhere things change faster than in I.T…. you can safely assume that whitin 10 years… a lot of things have and will change in I.T.

That’s why nobody can be god-of-everything – everybody will have to specify and set focus to as much as is 99% handleable.

So when companies ask for the “employee-that-does-it-all”… just like a device or server that “does it all” like the IPhone – camera – navigation – and you can actually still reliably make calls – wonder device – i guess it does not exist. 😀

Well the IPhone exists and kind of works – but it is probably one of the most complex things mankind ever build – so there will be millions and millions of errors in it – and if Apple does lazy quality testing… everyday life functionality gets unreliable.

Also you don’t always want to run around with a device that is perfect for spying on you:

think about it:

fast mobile internet + camera + microphone + gps = “THE” perfect “spying on you”-device. Call it: the ISpy. (Check this out: Backdoor in Samsung Galaxy Android Smartphones – how can you tell something like this does not exist on an IDevice?)

Efficiency is one thing – but you also will need resilience – probably even more than efficiency – 70% resiliance 30% efficiency seems to be what “nature” does.

Good balance important.

Less is more – the less software you need – the less complexity – the easier to manage – less probability of errors – will result into less errors and there fore more stability, security and user satisfaction and adoption.

UNIX Philosophy – Simple and Beautiful.

I guess Mr Jobs honored those values plus some innovative crazyness – that sometimes (multi-touch) – not always increase efficiency but sometimes is simpliy beautiful (“beautiful” seems to be the opposite of “do what sells for sure” thinking)

back to topic: SysVinit uses runlevels – systemd uses targets

unfortunately different implementations of UNIX/LINUX use(d) different runlevels for different things.

in general it should be roughly like:

0 – System halt; no activity, the system can be safely powered down.
1 – Single user text mode; stop all programs and services, repair filesystem and other maintenance. (“give root password” or Ctrl+D)


2 – Multiple users, no NFS (network filesystem);
3 – Multiple users, command line (i.e., all-text mode) interface; the standard runlevel for most Linux-based server hardware.
4 – User-definable
5 – Multiple users, GUI (graphical user interface); the standard runlevel for most Linux-based desktop systems.
6 – Reboot; used when restarting the system.

src: http://www.linfo.org/runlevel_def.html

to confuse you even more – Runlevels -systemd-> States

SysVInit is step for step replaced by systemd – which is just more capable.

SysVInit (old system used) used static runlevels to create different states to boot into, and most distros use five:

  • Single-user mode
  • Multi-user mode without network services started
  • Multi-user mode with network services started
  • System shutdown
  • System reboot.

Runlevels can be thought of “sets”. Set1 loads a different amount of services than Set5.

systemd

If something is not complicated – it is not “Made in Germany” or by a German.

Systemd is partly “Made in Germany” so yes it is complex and complicated and will take time to “sink in”/get used to

here he is Mr Poettering in 2014 explaining systemd and why it ought to be soooo complex.

with all decision making, it should be rational and fact and reason based and then stick to it (aka systemA boots faster than systemB, but systemB is easier in maintenance… etc.) whatever it might be.

One just hopes “the concept” won’t change every year (or users can have different concepts/forks that should be possible to be changed from the software package management or during setup: “does the user want SysVinit systemd or something else?”)

list all services

# all serivces
systemctl list-unit-files --type=service
# enabled (autostart?) services
systemctl list-unit-files | grep enabled
# all currently running services
systemctl | grep running

restart a service

systemctl restart sshd

list current target

output in what “target”/runlevel you are operating right now.

systemctl get-default;

change target

systemctl isolate sleep.target
# or
systemctl isolate hibernate.target
# or
systemctl isolate reboot.target

how to set default target to boot into

The symlink

#debian 8.8
/lib/systemd/system/default.target -> graphical.target

#centos7
/etc/systemd/system/default.target -> /usr/lib/systemd/system/graphical.target

#suse12
/etc/systemd/system/default.target -> /usr/lib/systemd/system/graphical.target

controls where we boot into by default.

unlink /lib/systemd/system/default.target; # delete link

ln -sv /lib/systemd/system/rescue.target /lib/systemd/system/default.target; # create new link

‘/lib/systemd/system/default.target’ -> ‘/lib/systemd/system/rescue.target’

what is a targets?

A unit configuration file whose name ends in “.target” encodes information about a target unit of systemd,

which is used for grouping units and as well-known synchronization points during start-up.

target1
   |_____state1
   |
   |_____state2
   |        |_____unit1
   |        |_____unit2
   |        |_____unit3
   |
   |_____state3

target2
   |_____state2
   |        |_____unit1
   |
   |_____state3
            |_____unit1
            |_____unit2

Instead of runlevels, systemd allows to create different states,

which gives flexible mechanism for creating different configurations to boot into.

These states are composed/consist of multiple unit files bundled into targets.

Targets have nice descriptive names instead of numbers.

Unit files control services, devices, sockets, and mounts.

One can see what these look like by examining the prefab targets that come with systemd, for example

# rpm/Fedora/CentOS/RedHat
cat /usr/lib/systemd/system/graphical.target

# apt/Debian/Ubuntu
cat /lib/systemd/system/graphical.target

example content:

hostnamectl; # tested on
  Operating System: Debian GNU/Linux 9 (stretch)
            Kernel: Linux 4.9.0-12-amd64
      Architecture: x86-64

cat /lib/systemd/system/graphical.target
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Graphical Interface
Documentation=man:systemd.special(7)
Requires=multi-user.target
Wants=display-manager.service
Conflicts=rescue.service rescue.target
After=multi-user.target rescue.service rescue.target display-manager.service
AllowIsolate=yes

src: https://www.linux.com/learn/intro-systemd-runlevels-and-service-management-commands

list all possible targets/runlevels

hostnamectl; # tested on MATE Desktop
  Operating System: Debian GNU/Linux 9 (stretch)
            Kernel: Linux 4.9.0-12-amd64
      Architecture: x86-64
systemctl list-units --type target

UNIT                       LOAD   ACTIVE SUB    DESCRIPTION                
basic.target               loaded active active Basic System               
cryptsetup.target          loaded active active Encrypted Volumes          
getty.target               loaded active active Login Prompts              
graphical.target           loaded active active Graphical Interface        
local-fs-pre.target        loaded active active Local File Systems (Pre)   
local-fs.target            loaded active active Local File Systems         
multi-user.target          loaded active active Multi-User System          
network-online.target      loaded active active Network is Online          
network-pre.target         loaded active active Network (Pre)              
network.target             loaded active active Network                    
nss-user-lookup.target     loaded active active User and Group Name Lookups
paths.target               loaded active active Paths                      
remote-fs.target           loaded active active Remote File Systems        
slices.target              loaded active active Slices                     
sockets.target             loaded active active Sockets                    
sound.target               loaded active active Sound Card                 
swap.target                loaded active active Swap                       
sysinit.target             loaded active active System Initialization      
time-sync.target           loaded active active System Time Synchronized   
timers.target              loaded active active Timers                     
virt-guest-shutdown.target loaded active active Libvirt guests shutdown    

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

21 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.


# DEBIAN8.7
uname -a
Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) i686 GNU/Linux

find / -name *.target
/usr/lib/systemd/user/default.target
/usr/lib/systemd/user/exit.target
/usr/lib/systemd/user/sockets.target
/usr/lib/systemd/user/printer.target
/usr/lib/systemd/user/smartcard.target
/usr/lib/systemd/user/paths.target
/usr/lib/systemd/user/shutdown.target
/usr/lib/systemd/user/bluetooth.target
/usr/lib/systemd/user/sound.target
/usr/lib/systemd/user/timers.target
/usr/lib/systemd/user/basic.target
/etc/systemd/system/multi-user.target.wants/remote-fs.target
/lib/systemd/system/network.target
/lib/systemd/system/halt.target
/lib/systemd/system/nss-user-lookup.target
/lib/systemd/system/default.target
/lib/systemd/system/sysinit.target
/lib/systemd/system/swap.target
/lib/systemd/system/runlevel6.target
/lib/systemd/system/getty.target
/lib/systemd/system/initrd-root-fs.target
/lib/systemd/system/emergency.target
/lib/systemd/system/multi-user.target.wants/getty.target
/lib/systemd/system/runlevel1.target
/lib/systemd/system/rescue.target
/lib/systemd/system/sockets.target
/lib/systemd/system/graphical.target
/lib/systemd/system/ctrl-alt-del.target
/lib/systemd/system/remote-fs-pre.target
/lib/systemd/system/mail-transport-agent.target
/lib/systemd/system/sigpwr.target
/lib/systemd/system/local-fs.target
/lib/systemd/system/network-online.target
/lib/systemd/system/runlevel5.target
/lib/systemd/system/runlevel3.target
/lib/systemd/system/multi-user.target
/lib/systemd/system/rpcbind.target
/lib/systemd/system/printer.target
/lib/systemd/system/umount.target
/lib/systemd/system/system-update.target
/lib/systemd/system/runlevel4.target
/lib/systemd/system/smartcard.target
/lib/systemd/system/suspend.target
/lib/systemd/system/paths.target
/lib/systemd/system/shutdown.target
/lib/systemd/system/kexec.target
/lib/systemd/system/reboot.target
/lib/systemd/system/initrd-switch-root.target
/lib/systemd/system/initrd.target
/lib/systemd/system/bluetooth.target
/lib/systemd/system/sleep.target
/lib/systemd/system/sound.target
/lib/systemd/system/cryptsetup-pre.target
/lib/systemd/system/slices.target
/lib/systemd/system/timers.target
/lib/systemd/system/network-pre.target
/lib/systemd/system/local-fs-pre.target
/lib/systemd/system/hybrid-sleep.target
/lib/systemd/system/hibernate.target
/lib/systemd/system/basic.target
/lib/systemd/system/runlevel2.target
/lib/systemd/system/cryptsetup.target
/lib/systemd/system/poweroff.target
/lib/systemd/system/sysinit.target.wants/cryptsetup.target
/lib/systemd/system/nss-lookup.target
/lib/systemd/system/time-sync.target
/lib/systemd/system/remote-fs.target
/lib/systemd/system/final.target
/lib/systemd/system/runlevel0.target
/lib/systemd/system/initrd-fs.target

# SUSE12
uname -a
Linux suse 4.4.21-69-default #1 SMP Tue Oct 25 10:58:20 UTC 2016 (9464f67) x86_64 x86_64 x86_64 GNU/Linux
suse:/home/user # find / -name *.target
/etc/systemd/system/multi-user.target.wants/remote-fs.target
/etc/systemd/system/default.target
find: File system loop detected; ‘/.snapshots/1/snapshot’ is part of the same file system loop as ‘/’.
/usr/lib/systemd/system/multi-user.target.wants/getty.target
/usr/lib/systemd/system/basic.target
/usr/lib/systemd/system/bluetooth.target
/usr/lib/systemd/system/busnames.target
/usr/lib/systemd/system/cryptsetup-pre.target
/usr/lib/systemd/system/cryptsetup.target
/usr/lib/systemd/system/ctrl-alt-del.target
/usr/lib/systemd/system/default.target
/usr/lib/systemd/system/emergency.target
/usr/lib/systemd/system/exit.target
/usr/lib/systemd/system/final.target
/usr/lib/systemd/system/getty.target
/usr/lib/systemd/system/graphical.target
/usr/lib/systemd/system/halt.target
/usr/lib/systemd/system/hibernate.target
/usr/lib/systemd/system/hybrid-sleep.target
/usr/lib/systemd/system/initrd-fs.target
/usr/lib/systemd/system/initrd-root-fs.target
/usr/lib/systemd/system/initrd-switch-root.target
/usr/lib/systemd/system/initrd.target
/usr/lib/systemd/system/kexec.target
/usr/lib/systemd/system/local-fs-pre.target
/usr/lib/systemd/system/local-fs.target
/usr/lib/systemd/system/machines.target
/usr/lib/systemd/system/multi-user.target
/usr/lib/systemd/system/network-online.target
/usr/lib/systemd/system/network-pre.target
/usr/lib/systemd/system/network.target
/usr/lib/systemd/system/nss-lookup.target
/usr/lib/systemd/system/nss-user-lookup.target
/usr/lib/systemd/system/paths.target
/usr/lib/systemd/system/poweroff.target
/usr/lib/systemd/system/printer.target
/usr/lib/systemd/system/reboot.target
/usr/lib/systemd/system/remote-fs-pre.target
/usr/lib/systemd/system/remote-fs.target
/usr/lib/systemd/system/rescue.target
/usr/lib/systemd/system/rpcbind.target
/usr/lib/systemd/system/runlevel0.target
/usr/lib/systemd/system/runlevel1.target
/usr/lib/systemd/system/runlevel2.target
/usr/lib/systemd/system/runlevel3.target
/usr/lib/systemd/system/runlevel4.target
/usr/lib/systemd/system/runlevel5.target
/usr/lib/systemd/system/runlevel6.target
/usr/lib/systemd/system/shutdown.target
/usr/lib/systemd/system/sigpwr.target
/usr/lib/systemd/system/sleep.target
/usr/lib/systemd/system/slices.target
/usr/lib/systemd/system/smartcard.target
/usr/lib/systemd/system/sockets.target
/usr/lib/systemd/system/sound.target
/usr/lib/systemd/system/suspend.target
/usr/lib/systemd/system/swap.target
/usr/lib/systemd/system/sysinit.target
/usr/lib/systemd/system/sysinit.target.wants/cryptsetup.target
/usr/lib/systemd/system/system-update.target
/usr/lib/systemd/system/time-sync.target
/usr/lib/systemd/system/timers.target
/usr/lib/systemd/system/umount.target
/usr/lib/systemd/system/nfs-client.target
/usr/lib/systemd/user/basic.target
/usr/lib/systemd/user/bluetooth.target
/usr/lib/systemd/user/busnames.target
/usr/lib/systemd/user/default.target
/usr/lib/systemd/user/exit.target
/usr/lib/systemd/user/paths.target
/usr/lib/systemd/user/printer.target
/usr/lib/systemd/user/shutdown.target
/usr/lib/systemd/user/smartcard.target
/usr/lib/systemd/user/sockets.target
/usr/lib/systemd/user/sound.target
/usr/lib/systemd/user/timers.target

# CENTOS7
uname -a
Linux centos 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@centos user]# find / -name *.target
/etc/systemd/system/multi-user.target.wants/remote-fs.target
/etc/systemd/system/default.target
/usr/lib/systemd/system/printer.target
/usr/lib/systemd/system/initrd-root-fs.target
/usr/lib/systemd/system/local-fs.target
/usr/lib/systemd/system/machines.target
/usr/lib/systemd/system/multi-user.target
/usr/lib/systemd/system/network-pre.target
/usr/lib/systemd/system/multi-user.target.wants/getty.target
/usr/lib/systemd/system/network-online.target
/usr/lib/systemd/system/network.target
/usr/lib/systemd/system/runlevel6.target
/usr/lib/systemd/system/reboot.target
/usr/lib/systemd/system/remote-fs-pre.target
/usr/lib/systemd/system/basic.target
/usr/lib/systemd/system/bluetooth.target
/usr/lib/systemd/system/nss-lookup.target
/usr/lib/systemd/system/nss-user-lookup.target
/usr/lib/systemd/system/paths.target
/usr/lib/systemd/system/sound.target
/usr/lib/systemd/system/cryptsetup-pre.target
/usr/lib/systemd/system/cryptsetup.target
/usr/lib/systemd/system/remote-fs.target
/usr/lib/systemd/system/ctrl-alt-del.target
/usr/lib/systemd/system/hibernate.target
/usr/lib/systemd/system/shutdown.target
/usr/lib/systemd/system/halt.target
/usr/lib/systemd/system/rescue.target
/usr/lib/systemd/system/hybrid-sleep.target
/usr/lib/systemd/system/sigpwr.target
/usr/lib/systemd/system/swap.target
/usr/lib/systemd/system/initrd-fs.target
/usr/lib/systemd/system/sleep.target
/usr/lib/systemd/system/runlevel0.target
/usr/lib/systemd/system/default.target
/usr/lib/systemd/system/rpcbind.target
/usr/lib/systemd/system/runlevel1.target
/usr/lib/systemd/system/emergency.target
/usr/lib/systemd/system/runlevel2.target
/usr/lib/systemd/system/final.target
/usr/lib/systemd/system/getty.target
/usr/lib/systemd/system/runlevel3.target
/usr/lib/systemd/system/graphical.target
/usr/lib/systemd/system/runlevel4.target
/usr/lib/systemd/system/poweroff.target
/usr/lib/systemd/system/initrd-switch-root.target
/usr/lib/systemd/system/local-fs-pre.target
/usr/lib/systemd/system/initrd.target
/usr/lib/systemd/system/runlevel5.target
/usr/lib/systemd/system/kexec.target
/usr/lib/systemd/system/slices.target
/usr/lib/systemd/system/smartcard.target
/usr/lib/systemd/system/sockets.target
/usr/lib/systemd/system/suspend.target
/usr/lib/systemd/system/sysinit.target
/usr/lib/systemd/system/sysinit.target.wants/cryptsetup.target
/usr/lib/systemd/system/system-update.target
/usr/lib/systemd/system/time-sync.target
/usr/lib/systemd/system/timers.target
/usr/lib/systemd/system/umount.target
/usr/lib/systemd/system/iprutils.target
/usr/lib/systemd/user/basic.target
/usr/lib/systemd/user/bluetooth.target
/usr/lib/systemd/user/default.target
/usr/lib/systemd/user/exit.target
/usr/lib/systemd/user/paths.target
/usr/lib/systemd/user/printer.target
/usr/lib/systemd/user/shutdown.target
/usr/lib/systemd/user/smartcard.target
/usr/lib/systemd/user/sockets.target
/usr/lib/systemd/user/sound.target
/usr/lib/systemd/user/timers.target
/usr/lib/dracut/modules.d/98systemd/initrd.target

vim /etc/init.d/README

looking for the traditional init scripts in /etc/rc.d/init.d, and they are gone?

Here’s an explanation on what’s going on:

One is running a systemd-based OS where traditional init scripts have been replaced by native systemd services files.

Service files provide very similar functionality to init scripts.

To make use of service files simply invoke “systemctl”, which will output a list of all currently running services (and other units). Use “systemctl
list-unit-files” to get a listing of all known unit files, including stopped, disabled and masked ones. Use “systemctl start
foobar.service” and “systemctl stop foobar.service” to start or stop a service, respectively. For further details, please refer to systemctl(1).

Note that traditional init scripts continue to function on a systemd system. An init script /etc/rc.d/init.d/foobar is implicitly mapped into a service unit foobar.service during system initialization.

Thank you!

Further reading:
man:systemctl(1)
man:systemd(1)
http://0pointer.de/blog/projects/systemd-for-admins-1.html
http://0pointer.de/blog/projects/systemd-for-admins-2.html
http://0pointer.de/blog/projects/systemd-for-admins-3.html
http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities

how to test if system is using SysVinit or systemd is used/active

SUSE12, Debian8.7, CENTO7 all use systemd (2017.04) –

uname -a
Linux suse 4.4.21-69-default #1 SMP Tue Oct 25 10:58:20 UTC 2016 (9464f67) x86_64 x86_64 x86_64 GNU/Linux
# tested on Suse & Debian 9
ps -p 1
  PID TTY          TIME CMD
    1 ?        00:00:01 systemd

ps -p 1 -o pid,vsz=MEMORY -o user,group=GROUP -o comm,args=ARGS
# Suse output
PID MEMORY USER GROUP COMMAND ARGS
1 185136 root root systemd /usr/lib/systemd/systemd --switched-root --system --deserialize 22


uname -a
Linux centos 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
ps -p 1
PID TTY TIME CMD
1 ? 00:00:01 systemd

ps -p 1 -o pid,vsz=MEMORY -o user,group=GROUP -o comm,args=ARGS
PID MEMORY USER GROUP COMMAND ARGS
1 128092 root root systemd /usr/lib/systemd/systemd --switched-root --system --deserialize 21

uname -a
Linux debian 3.16.0-4-686-pae #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) i686 GNU/Linux
ps -p 1
PID TTY TIME CMD
1 ? 00:00:00 systemd

# under Debian/Ubuntu do not get confused - the binary is called init - but it is the systemd binary
ps -p 1 -o pid,vsz=MEMORY -o user,group=GROUP -o comm,args=ARGS
PID MEMORY USER GROUP COMMAND ARGS
1 5432 root root systemd /sbin/init

# Debian 9 output
  PID MEMORY USER     GROUP    COMMAND         ARGS
    1 204816 root     root     systemd         /sbin/init

vim /etc/init.d/README

bash it

uname -a
# Suse 12 Enterprise Server - Linux 4.4.21-69-default #1 SMP Tue Oct 25 10:58:20 UTC 2016 (9464f67) x86_64 x86_64 x86_64 GNU/Linux

runlevel; # show current runlevel SUSE12
N 5

chkconfig -l; # is the old SysVinit programm, but still working, it is replaced by systemctrl
# it show status of all services and on what runlevel they will be started

Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.
If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.
after.local 0:off 1:off 2:off 3:off 4:off 5:off 6:off
chargen 0:off 1:off 2:off 3:off 4:off 5:off 6:off
chargen-udp 0:off 1:off 2:off 3:off 4:off 5:off 6:off
cifs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
cups-lpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
daytime 0:off 1:off 2:off 3:off 4:off 5:off 6:off
daytime-udp 0:off 1:off 2:off 3:off 4:off 5:off 6:off
dbus 0:off 1:off 2:on 3:on 4:off 5:on 6:off
discard 0:off 1:off 2:off 3:off 4:off 5:off 6:off
discard-udp 0:off 1:off 2:off 3:off 4:off 5:off 6:off
echo 0:off 1:off 2:off 3:off 4:off 5:off 6:off
echo-udp 0:off 1:off 2:off 3:off 4:off 5:off 6:off
inputattach 0:off 1:off 2:off 3:off 4:off 5:off 6:off
netstat 0:off 1:off 2:off 3:off 4:off 5:off 6:off
openct 0:off 1:off 2:on 3:on 4:on 5:on 6:off
pcscd 0:off 1:off 2:on 3:on 4:off 5:on 6:off
postfix 0:off 1:off 2:off 3:off 4:off 5:off 6:off
raw 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rpmconfigcheck 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rsync 0:off 1:off 2:off 3:off 4:off 5:off 6:off
servers 0:off 1:off 2:off 3:off 4:off 5:off 6:off
services 0:off 1:off 2:off 3:off 4:off 5:off 6:off
slpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
snmpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
snmptrapd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
systat 0:off 1:off 2:off 3:off 4:off 5:off 6:off
time 0:off 1:off 2:off 3:off 4:off 5:off 6:off
time-udp 0:off 1:off 2:off 3:off 4:off 5:off 6:off
vnc 0:off 1:off 2:off 3:off 4:off 5:off 6:off
vsftpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
xinetd based services:
chargen: off
chargen-udp: off
cups-lpd: off
daytime: off
daytime-udp: off
discard: off
discard-udp: off
echo: off
echo-udp: off
netstat: off
rsync: off
servers: off
services: off
systat: off
time: off
time-udp: off
vnc: off
vsftpd: off

ls -l /usr/sbin/rc*
lrwxrwxrwx 1 root root 7 24. Apr 12:51 /usr/sbin/rcatd -> service
lrwxrwxrwx 1 root root 7 24. Apr 12:51 /usr/sbin/rcauditd -> service
lrwxrwxrwx 1 root root 7 24. Apr 12:51 /usr/sbin/rcautofs -> service
lrwxrwxrwx 1 root root 7 24. Apr 12:56 /usr/sbin/rcbmc-snmp-proxy -> service
lrwxrwxrwx 1 root root 36 24. Apr 12:55 /usr/sbin/rcbrltty -> ../lib/systemd/system/brltty.service
lrwxrwxrwx 1 root root 7 24. Apr 12:51 /usr/sbin/rcbtrfsmaintenance-refresh -> service
lrwxrwxrwx 1 root root 7 24. Apr 12:58 /usr/sbin/rccifs -> service
lrwxrwxrwx 1 root root 13 24. Apr 12:54 /usr/sbin/rccron -> /sbin/service
lrwxrwxrwx 1 root root 7 24. Apr 12:57 /usr/sbin/rccups -> service
lrwxrwxrwx 1 root root 7 24. Apr 12:41 /usr/sbin/rccups-browsed -> service
lrwxrwxrwx 1 root root 16 24. Apr 12:38 /usr/sbin/rcdbus -> /etc/init.d/dbus
lrwxrwxrwx 1 root root 7 24. Apr 12:55 /usr/sbin/rcdisplay-manager -> service
lrwxrwxrwx 1 root root 7 24. Apr 12:56 /usr/sbin/rcexchange-bmc-os-info -> service
lrwxrwxrwx 1 root root 13 24. Apr 12:49 /usr/sbin/rcfstrim -> /sbin/service
lrwxrwxrwx 1 root root 7 24. Apr 12:51 /usr/sbin/rcgeoclue -> service
lrwxrwxrwx 1 root root 13 24. Apr 12:51 /usr/sbin/rcgpm -> /sbin/service
lrwxrwxrwx 1 root root 7 24. Apr 12:51 /usr/sbin/rchaveged -> service
lrwxrwxrwx 1 root root 23 24. Apr 12:33 /usr/sbin/rcinputattach -> /etc/init.d/inputattach
lrwxrwxrwx 1 root root 7 24. Apr 12:56 /usr/sbin/rcipmievd -> service
lrwxrwxrwx 1 root root 7 24. Apr 12:51 /usr/sbin/rcirqbalance -> service
lrwxrwxrwx 1 root root 7 24. Apr 12:49 /usr/sbin/rciscsi -> service
lrwxrwxrwx 1 root root 7 24. Apr 12:49 /usr/sbin/rciscsid -> service
lrwxrwxrwx 1 root root 7 24. Apr 12:55 /usr/sbin/rciscsiuio -> service
...

ls -l /usr/sbin/rc*|grep slpd
lrwxrwxrwx 1 root root 16 24. Apr 12:49 /usr/sbin/rcopenslp -> /etc/init.d/slpd
lrwxrwxrwx 1 root root 16 24. Apr 12:49 /usr/sbin/rcslpd -> /etc/init.d/slpd

/etc/init.d/slpd status; # get status of service
Checking for slpd unused
● slpd.service - OpenSLP daemon for the Service Location Protocol
Loaded: loaded (/usr/lib/systemd/system/slpd.service; disabled; vendor preset: disabled)
Active: inactive (dead)

/etc/init.d/slpd start; # run the script with argument start to start the service
redirecting to systemctl start slpd.service

suse:/etc/init.d #
/etc/init.d/slpd status
Checking for slpd running
● slpd.service - OpenSLP daemon for the Service Location Protocol
Loaded: loaded (/usr/lib/systemd/system/slpd.service; disabled; vendor preset: disabled)
Active: active (running) since Mi 2017-05-03 16:44:20 CEST; 4s ago
Process: 9250 ExecStart=/usr/sbin/slpd (code=exited, status=0/SUCCESS)
Main PID: 9253 (slpd)
Tasks: 1 (limit: 512)
CGroup: /system.slice/slpd.service
└─9253 /usr/sbin/slpd

rcslpd restart; # short for restart service slpd
redirecting to systemctl restart slpd.service

rcslpd stop; # short for stopping service slpd
redirecting to systemctl stop slpd.service

# you can have chkconfig also on debian
apt-get update; apt-get install chkconfig; # should do the job

chkconfig -l; # on debian 8.7
acpid 0:off 1:off 2:on 3:on 4:on 5:on 6:off
atd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
avahi-daemon 0:off 1:off 2:on 3:on 4:on 5:on 6:off
bootlogs 0:off 1:on 2:on 3:on 4:on 5:on 6:off
bootmisc.sh 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
checkfs.sh 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
checkroot-bootclean.sh 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
checkroot.sh 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
console-setup 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
cpufrequtils 0:off 1:off 2:on 3:on 4:on 5:on 6:off
cron 0:off 1:off 2:on 3:on 4:on 5:on 6:off
dbus 0:off 1:off 2:on 3:on 4:on 5:on 6:off
exim4 0:off 1:off 2:on 3:on 4:on 5:on 6:off
hddtemp 0:off 1:off 2:on 3:on 4:on 5:on 6:off
hdparm 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
hostname.sh 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
hwclock.sh 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
kbd 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
keyboard-setup 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
killprocs 0:off 1:on 2:off 3:off 4:off 5:off 6:off
kmod 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
lightdm 0:off 1:off 2:on 3:on 4:on 5:on 6:off
loadcpufreq 0:off 1:off 2:on 3:on 4:on 5:on 6:off
motd 0:off 1:on 2:on 3:on 4:on 5:on 6:off
mountall-bootclean.sh 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
mountall.sh 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
mountdevsubfs.sh 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
mountkernfs.sh 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
mountnfs-bootclean.sh 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
mountnfs.sh 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
networking 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
nfs-common 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
nmbd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
procps 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
rc.local 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rcS 0:off 1:off 2:off 3:off 4:off 5:off 6:off
rmnologin 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rpcbind 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
rsync 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rsyslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
samba 0:off 1:off 2:off 3:off 4:off 5:off 6:off
samba-ad-dc 0:off 1:off 2:on 3:on 4:on 5:on 6:off
saned 0:off 1:off 2:on 3:on 4:on 5:on 6:off
sendsigs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
smbd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
ssh 0:off 1:off 2:on 3:on 4:on 5:on 6:off
sudo 0:off 1:off 2:off 3:off 4:off 5:off 6:off
udev 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
udev-finish 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
umountfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
umountnfs.sh 0:off 1:off 2:off 3:off 4:off 5:off 6:off
umountroot 0:off 1:off 2:off 3:off 4:off 5:off 6:off
urandom 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on
x11-common 0:off 1:off 2:off 3:off 4:off 5:off 6:off S:on

Links:

https://packages.debian.org/de/jessie/chkconfig

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin