5

I want to find out in which runlevel the files of /etc/init.d‍ are started. Has someone any idea? I thought there might be the option to find it with the find command

Ravexina
  • 54,268
  • 25
  • 157
  • 179

1 Answers1

7

Run:

cd /etc/init.d
grep Default-Start *

Results:

dbus:# Default-Start:     2 3 4 5
docker:# Default-Start:      2 3 4 5
gdomap:# Default-Start:     2 3 4 5
...

Just to note, from man runlevel:

   ┌─────────┬───────────────────┐
   │Runlevel │ Target            │
   ├─────────┼───────────────────┤
   │0        │ poweroff.target   │
   ├─────────┼───────────────────┤
   │1        │ rescue.target     │
   ├─────────┼───────────────────┤
   │2, 3, 4  │ multi-user.target │
   ├─────────┼───────────────────┤
   │5        │ graphical.target  │
   ├─────────┼───────────────────┤
   │6        │ reboot.target     │
   └─────────┴───────────────────┘
Ravexina
  • 54,268
  • 25
  • 157
  • 179
  • to add to this answer; check `/etc/rc*.d/` to which which program runs at '*' run level. like for dbus you will find entries in `/etc/rc2.d/` `/etc/rc3.d/` `/etc/rc4.d/` `/etc/rc5.d/` – yashC Jan 01 '19 at 12:58
  • Thank you, great help. Can you also tell me what the "S" means, that appears after Default-Start? – changepicture Jan 01 '19 at 14:45
  • @changepicture it should be single mode: First paragraph of [RunLevel](https://wiki.debian.org/RunLevel) – Ravexina Jan 01 '19 at 16:21