I use Ubuntu Server 22.04.4 LTS. My task is to setup runlevel (target) 4 to automatically start ssh. I suppose I have found solutions how to do that and implemented that using script placed in rc4.d (I have to make it that way). However I cannot switch to that level. When I try i.e. to switch from 5th level to 4th using sudo init 4or sudo telinit 4, it switches me to 3rd layer. There are no any problems switching i.e. from 3rd to 5th and vice versa. In a directory of 'rc4.d' i have scripts which are similar to what i can encounter in 'rc3.d' and 'rc5.d'. There are: 'K01ssh', 'S01apport', 'S01console-setup.sh', 'S01dbus', 'S01grub-common', 'S01lvm2-lvmpolld', S01playmouth', 'S01unattended-upgrades', so the directory is not blank. Also I had possibility to check how it works on "freshly" installed Ubuntu Server 22.04.4 LTS and Ubuntu for desktop with GUI and the problem is similar, eventhough switching between 3rd and 5th target worked fine. What should I modify/configurate in order to be able to enter 4th runlevel?
Asked
Active
Viewed 70 times
0