After I switch to virtual console using Ctrl+Alt+F6 I could not get back to X session using Ctrl+Alt+F7 - only blinking cursor is shown. Tried chvt - same result. Have to reboot and lost all my opened apps which is very inconvenient. Kubuntu version is 18.04 Bionic.

Could anybody help?


Other as in Ubuntu 17.10 and later, in Kubuntu 18.04 the default display manager is SDDM, where:

  • tty1 holds the GUI session
    get there with Ctrl+Alt+F1 or (sudo) chvt 1
  • tty2 to tty6 hold non-graphical TTY sessions
    get there with Ctrl+Alt+F2 to F6 or (sudo) chvt 2 to chvt 6
  • tty7 and above are unused

Further reading:

| improve this answer | |
  • What's the logic in needing sudo for actions that can be done with an unprivileged keyboard shortcut? – Eric Duminil Jun 11 '18 at 12:51
  • 1
    @EricDuminil At least I need sudo to run chvt from a normal terminal session, else Couldn't get a file descriptor referring to the console. – dessert Jun 11 '18 at 13:04
  • 4
    @EricDuminil: A remote user or unprivileged daemon account cannot press keys on your keyboard. Pressing something on the keyboard conveys a high level of privilege: you're physically present and thus capable of taking over the machine in any number of physical ways. – R.. GitHub STOP HELPING ICE Jun 11 '18 at 15:09

On a Linux text-mode virtual console / terminal, Alt+left-arrow and Alt+right-arrow cycle through virtual consoles.

(X servers disable that keybind, so switch to a text-mode VC first, with ctrl+alt+f2, or any VC number that doesn't have an X session running on it.

If you're ever not sure which VC something is on, or which VTs exist, use one of those to cycle through and see what you find. If there's an X session running on a VC, you will find it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.