change ACTIVE_CONSOLES="/dev/tty[1-6]" to your choice. Lets say if you want only two TTY or virtual console then change to ACTIVE_CONSOLES="/dev/tty[1-2]"
cd /etc/event.d
Comment on all the lines in ttyX file that you don't need. In this example tty3-tty6
Reboot to see the change.
I found three methods. I'm listing to help others if they need:
First Method:
Second Method:
Open/create the file
/etc/X11/xorg.conf
using the following command:and add the following lines inside:
Third Method:
change
ACTIVE_CONSOLES="/dev/tty[1-6]"
to your choice. Lets say if you want only two TTY or virtual console then change toACTIVE_CONSOLES="/dev/tty[1-2]"
Comment on all the lines in
ttyX
file that you don't need. In this exampletty3-tty6
Reboot to see the change.Open/create the file
/etc/X11/xorg.conf
using the following command:and add the following lines inside:
Source: [all variants] How to disable CTRL ALT F1 - ubuntuforums.org
This will totally remove the
tty* conf
file and thus you will not be able to use it :)NB: you can't be able to restore it later on
open the tty conf in the
/etc/init/
directorycomment out those lines in the ttyX.conf files:
Example to disable tty1:
Then edit by inserting # in front of the commands
Save and Reboot
On Gnome Wayland you can unset the keybindings for virtual terminal switching by setting these dconf properties: