0

i am exploring the runlevel of ubuntu system,

when i run runlevel, to display the current runlevel, i got:

N 5

but inside the /etc/init/rc-sysinit.conf:

env DEFAULT_RUNLEVEL=2

why default runlevel is different from my current runlevel, i didnt make any change to it

and since the runlevel numbers stand for:

Code        Description
2           Graphical multi-user with networking
3-5         Unused but configured the same as runlevel 2

i am confused about that

1 Answer 1

1

I was confused about this problem several days ago, at last I found out that ubuntu has now switch to "systemd" to complete the initialize and command the process since version 15.04, both "initSysV" and "start-up" are not used now. since /etc/init/rc-sysinit.conf is the configuration text of start-up …so …

systemd just use "runlevel" for compatibility.

you may make sure of this by looking into /sbin/init

mt@mt-X550VC:~$ file /sbin/init

/sbin/init: symbolic link to /lib/systemd/systemd

mt@mt-X550VC:~$ ll /sbin/init

lrwxrwxrwx 1 root root 20 2月 10 16:53 /sbin/init -> /lib/systemd/systemd*

when you run "init" , you run "systemd" actually :)

details here: https://en.wikipedia.org/wiki/Systemd

curiously , if you run "init [2,4]" on x-window, you will get stuck, the reason remains unknown to me. you can run "init 5" in tty1 to get back. but if you run "runlevel" then, you will get an output as "3 5" ,not "2 5" or "4 5",so i believe the variable "runlevel" was assigned to "3" when you run "init [2,3,4]", to "5" when "init 5".

i am chinese and not good at english , hope I have made it clear enough :)

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .