1

In Ubuntu 19.10, how can you exit the desktop and go straight to a terminal?

I'd prefer to do this using a command, instead of Ctrl-Alt-F1 type techniques, because I'm doing this in a virtual machine, and I don't want those keys-combinations to be mistakenly directed to the host instead of being direct to the virtual machine.

4
sudo systemctl isolate Name (multi-user.target) in your case

Start the unit specified on the command line and its dependencies and stop all others, unless they have IgnoreOnIsolate=yes (see systemd.unit(5)). If a unit name with no extension is given, an extension of ".target" will be assumed.

This is similar to changing the runlevel in a traditional init system. The isolate command will immediately stop processes that are not enabled in the new unit, possibly including the graphical environment or terminal you are currently using.

Note that this is allowed only on units where AllowIsolate= is enabled. See systemd.unit(5) for details.

Stolen from manpage.

1
  • Thanks! This works in my Ubuntu 19.10 virtual machine: sudo systemctl isolate multi-user.target Oct 25 '19 at 19:55
0

There is no command to log out and immediately switch to a virtual console in 19.10 or any previous Ubuntu version.

If you want to use CLI only, it would be better to use the Ubuntu Server ISO instead. If you want to use both CLI and GUI, it would be better to just use terminal app inside the GUI.

Another option is also to just set up OpenSSH server in the VM, and then you can use ssh from the host to the VM while it's running, and not have to open the VM window display at all (depending on which VM solution you're using).

0

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.