No Shell in! -- My bad


[Newbie alert! - I have old Unix experience, but don’t know current-day Rocky Linux specifics.]

I was trying to install a new NVIDIA driver and believed I needed to get out of X to do so. I thought I could use (set with systemctl set-default) to get just a shell to run the installer, but that is not the case. Now I am stuck with a clean boot and no way to interact with the system to get back to normal.

Can someone please tell me how to get to a shell so I can fix this system?

After that, I’d love to know how to start Rocky without the X/graphical interface.

Thank you!


On GRUB menu, before you select a kernel to boot with, do edit the boot entry.
There you can add kernel command-line parameters and thus override that default.
(On one of the lines you should see some parameters, so append yours there. Then Ctrl-x to boot.)

The parameter to choose target is systemd.unit=, so:

  • for graphical (about same as old runlevel 5)
  • for non-graphical (about same as old runlevel 3)

One can also switch from one to other without reboot (when one has usable shell).
E.g. systemctl isolate

(I have occasionally switched to virtual console and then run the above to stop graphical bits, followed by install of NVidia.)

Thank you very much! That’s what I think I will need if you can give me a little more direction.

I have tried variations of “boot --set” but as you probably know, that doesn’t work.

You say “edit the boot entry” but I don’t know how to do that. I have looked through the GRUB manual and help but don’t see anything about editing the boot entry. I have tried searching for linux kernels but keep getting messages about unknown device.

Can you give me a little more direction or example? Or do you know of a Beginner’s Manual describing how this is supposed to work?


When you turn on the machine there may briefly show a text menu that lists different versions of kernels. “GRUB menu”. It might be hidden too. By default the latest installed kernel is selected (after short timeout) and then GRUB loads kernel and OS boots.

During that menu one can change selection of kernel wit arrow keys (which stops timer) and by pressing ‘e’ shift to “edit entry” mode. (How to do it when the menu is hidden … I have not studied.)

That’s the magic I needed! Thank you very much!