RH302 · Question #194
RH302 Question #194: Real Exam Question with Answer & Explanation
Answers: In this lab, experiment with deactivating a specific virtual console. By default, six virtual text login consoles are configured in the /etc/inittab configuration file. You'll deactivate the second of the six consoles. 1.Log in as the root user. You can do this from eith
Question
Explanation
Answers: In this lab, experiment with deactivating a specific virtual console. By default, six virtual text login consoles are configured in the /etc/inittab configuration file. You'll deactivate the second of the six consoles. 1.Log in as the root user. You can do this from either the GUI or the text login interface. If you're in the GUI, open a text console. Right-click the desktop and choose New Terminal in the pop-up menu. 2.Run the cp /etc/inittab /root/inittab command. This backs up the subject configuration file in the root user's home directory. 3.Open the subject file with the vi /etc/inittab command. 4.Scroll down until you see the following line: 5:2:2345:respawn:/sbin/mingetty tty2 6.Press CTRL-ALT-F2. This should start a text login interface. You should be able to log in at the prompt with your username and password. (If you've started at a text console, you don't need to use the CTRL button.) 7.If you logged into the GUI, press CTRL-ALT-F7 to return to the GUI. If you logged into the text interface, press CTRL-ALT-F1 to return to your original screen. 8.Turn the subject command in /etc/inittab into a comment. Add a comment character in front of the line as shown: 9:#2:2345:respawn:/sbin/mingetty tty2 10.Close and save this change to /etc/inittab using the :wq command. 11.Make Linux reread /etc/inittab with the init q command. 12.Press CTRL-ALT-F2. This should start a text login interface. Try logging in again. You'll see that it's not possible. Now you can see how adding a comment character to the right line in /etc/inittab deactivates the second virtual console. 13.If you logged into the GUI, press CTRL-ALT-F7 to return to the GUI. If you logged into the text interface, press CTRL-ALT-F1 to return to your original screen. 14.Restore your original settings in the /etc/inittab file.
Community Discussion
No community discussion yet for this question.