Virtual Terminals(TTY) – Linux Tutorial for Beginners


welcome to the video tutorial on virtual terminals Linux is a multi-user system which allows many users to work on it simultaneously so what if different users need to work on the same system at a time how do you do that this is where we need the virtual terminals so let us learn about them virtual terminals are similar to the terminal that we have been using so far they’re used for executing commands and offering input the only difference is that we cannot use the mouse with the virtual terminals therefore you need to know the keyboard shortcuts they are one of the most distinguished features of Linux as virtual terminals enable a number of users to work on different programs at the same time on the same computer so let us learn how to launch a virtual terminal the steps to launch a virtual terminal are press the ctrl + alt + f1 key combination on your keyboard enter the user ID and password and you will be good to go let us try it on a bun do so let us go ahead and press the ctrl + Alt + f1 key combination as soon as we do it we see the login screen for the virtual terminal so let us put in the user name upon entering the password we would be able to log in to the virtual terminal one as usually there are six virtual terminals on a Linux operating system and you can log into them as different users to conduct different tasks you can navigate between the six virtual terminals using the following command it says ctrl + Alt + f1 to f6 key f1 being the first while f6 being the last virtual terminal you can work on all of them at the same time in order to know which virtual terminal you are working on note the tty given at the top so right now we are working on the first virtual terminal so if you want to switch to the second virtual terminal you can press the ctrl + Alt + f2 key combination to navigate pressing ctrl + Alt + f3 key combination will take you to the third virtual terminal TTY is a teletype number which you can also know by typing the command TTY on the terminal so right now we are working on TTY 1 it is important to note here that you need to log in to each virtual terminal to be able to work on them the 7th terminal is the one which we have been using so far in the Linux tutorials it can be accessed by using the key combination ctrl + Alt + f7 so let us try it on the operating system so pressing the ctrl + Alt + f7 key combination would take you to the terminal window on the screen these are some of the shortcuts that you should be aware of while working on the virtual terminals so using the home or ctrl + a key combination would move the cursor to the start of the current line reset would reset the virtual terminal history would list the commands executed by the user the arrow up shortcut would scroll up in history and you need to enter to execute a command ctrl + D would lock you out from the virtual terminal and using ctrl + Alt + delete key combination would reboot the system now let’s try some of them on a virtual terminal let’s start with the history command and swing this command would give us all the commands executed by the user in the past now if you want to clean the virtual terminal window you need to type in reset in order to run the commands from the history you can press the arrow up key and you will be able to see all the commands used in the past we can then hit the enter key and the command would be executed let’s say we want to use the echo command with this strength but here we have misspelled the word echo as we cannot use the mouse with virtual terminals we need to use the left and right arrow keys to navigate or I can simply press the HOME key and it would take me to the start of the current command line pressing end would take me to the end of it so let’s say if I want you to move this letter I can take the cursor to the letter and then I need to press the Delete key and it would clear out the wrong letter if you want to autocomplete the commands you can press the tab key so if I type EC and press the tab key the command would be auto-completed to echo this is how we can use the virtual terminal shortcuts so let us press the ctrl + D key combination and logout from the virtual terminal let us do a quick recap virtual terminals RCL eyes which executes the user commands there are six virtual terminals which can be launched using the shortcut keys they offer multi-user environment and up to six users can work on them at the same time unlike terminals we can not use the mouse with virtual terminals to launch a virtual terminal press ctrl + Alt + f1 – 6 key combination on the keyboard and use the same command to navigate to return to the home screen of the Linux system use ctrl + Alt + f7 and it will take you to the terminal thank you for watching this tutorial I’ll see you in the next one