1

I install Ubuntu Server 20.04.3 LTS on virtualbox in a windows 10 environment. I installed gedit (sudo apt install gedit). After gedit finished installing and after a reboot I ended up with a GUI interface and there was no way to get back to the terminal?

vanadium
  • 88,010
Lloyd
  • 11

3 Answers3

2

Gedit and terminal emulators are programs that run in a graphical environmement. Therefore, installing one of these on a command line system will pull in an entire graphical environment as well, and configure that to auto load.

Of course, you can configure the system to again boot to the terminal. You will, however, need to load the graphical environment each time when you want to use Gedit or the graphical terminal emulator you installed.

To remove every package you installed while installing Gedit and Gnome Terminal is more difficult if you did not take note of all packages that were installed because key packages also will be marked as 'manually installed'.

vanadium
  • 88,010
0

If you're looking for an editor without a GUI, nano is the way to go. sudo apt install nano even though I do believe it's already provided.

Fadi
  • 1
0

You have Ubuntu Server in a [Virtualbox] virtual machine

  • If you have not spent too much time configuring it, I think the best option is to reinstall it and then think twice before installing graphical tools.

  • If you can live with a lot of extra software occupying virtual drive space, fine.

  • You can make your server boot in text mode again according to the following link,

    https://ubuntuhandbook.org/index.php/2020/05/boot-ubuntu-20-04-command-console/

    The last command line in that handbook text is important (may be enough in your case depending on what you have already in the grub set-up).

    sudo systemctl set-default multi-user.target
    

Alternative: light-weight graphical environment and tools

You can also install a set of lighter tools to enable graphics and lighter application tools. Instead of a full desktop environment, you can install xinit and a window manager, for example fluxbox, the terminal emulator xterm or sakura and the editor geany.

See also the following link,

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • @Lloyd, Have a look at this link. The answer by Krackout might be relevant for you: to set the default boot (text mode, not graphic mode). Please let us know, if it helps (makes booting in text mode persistent). – sudodus Dec 08 '21 at 19:54