How to increase the number of virtual terminals and how to convert these virtual terminals in GUI?

Ayushmilan
3 min readJun 30, 2023

--

To increase the number of virtual terminals (also known as virtual consoles) in Linux-based systems, you can follow these steps:

  1. Open a terminal: You can open a terminal by searching for “Terminal” in the application launcher.

2. Edit the /etc/systemd/logind.conf file: Use a text editor (e.g., nano or vi) to open the logind.conf file as the root user or with sudo privileges. For example:

vi /etc/systemd/logind.conf

3. Find the line that starts with #NAutoVTs= and remove the # symbol at the beginning of the line to uncomment it (by default it provides 6 virtual terminals).

4. Set the desired number of virtual terminals: Modify the uncommented line to specify the number of virtual terminals you want. For example, if you want 8 virtual terminals, change the line to:

NAutoVTs=8

5. Save the changes and exit the text editor.

6. Restart the systemd-logind service: Run the following command to restart the systemd-logind service and apply the changes:

systemctl restart systemd-logind

After increasing the number of virtual terminals, you can switch between them by pressing Ctrl+Alt+F1 to Ctrl+Alt+F8. Each combination represents a different virtual terminal.

Press Ctrl+Alt+F6
Press Ctrl+Alt+F8

Using tty2, we can perform the following actions to go from a GUI (graphical user interface) session to a CLI (command-line interface) session and back again:

  1. To switch to a CLI-only mode after logging in, execute the command.
sudo systemctl isolate multi-user.target

With this command, the GUI session will end and the command-line interface will take its place. Please take note that depending on your Linux distribution, this command could differ.

2. Next use the following command.

sudo systemctl isolate graphical.target

This command again return to the GUI session running on tty2.

--

--

Ayushmilan
Ayushmilan

Written by Ayushmilan

Associate Data Scientist, Technical Content Writer, GATE CSE(2022, 2023) Qualified

No responses yet