Getting Into the Linux Shell

Linux TTY Console Has Special Moo Powers
Linux TTY Console Has Special Moo Powers

The place where commands are typed instead of clicked: The Linux Shell

You will see it called shell, terminal, console, command-line, tty, tty session and many other things but, really, it is just a black screen with a text prompt that lets you run non graphical programs (scripts) by typing their name at the prompt and pressing enter.

When you can’t access your desktop, and a quick reboot doesn’t help, you will need to use the Linux shell. Getting into the shell is easy and whenever I say drop to a shell I mean you should do one of the things suggested below here.

Option One: Ctrl+Alt+Function Key

The typical way to drop to a shell is to press Ctrl+Alt+F1 or Ctrl+Alt+Any function key from F1 through F6. This should make your screen go black for a second or two before it displays a textual login prompt. Use your regular desktop login username and password to log into the shell.

Option Two: Recovery Mode

Access the boot menu (or grub menu) by continuously tapping the Shift key when the computer begins to boot up. Keep tapping Shift until the boot menu shows. In the menu, select the Recovery Console option then select Drop to Root Shell Prompt with Networking.

If tapping the Shift key doesn’t bring up the boot menu, tap Escape instead.

You might need to restart a few times before tapping Shift (or Esc) takes you to the boot menu.

Be careful while using a root shell because you will have super user rights. Running your OS and applications under root privileges (admin rights) will leave your OS undefended against malicious software such as viruses.

Option Three: Log into a Console at the Login Prompt

Most display managers (login screens) have a drop-down menu that lets you choose the environment you want to log into. When using the GNOME Desktop Manager (GDM), the drop-down menu is in the menu bar at the bottom of the screen. When using the KDE Desktop Manager (KDM), the drop-down menu is usually beneath the login form. Most desktop managers place their drop-down menus in either of those two places. XDM (The X Desktop Manager) is one of the exceptions that doesn’t provide an option for choosing the desktop environment to be logged into.

The option for logging into the Linux shell is often labelled Failsafe or Console. Choose it, then log in as per normal and a terminal window will open up. Use this terminal as you would the Linux shell.

Option Four: Ctrl+Alt+Backspace

Pressing Ctrl+Alt+Backspace should kill the window manager for the active display.

This key combination is disabled in modern versions of Ubuntu but when you have command-line access, you can re-enable it with

setxkbmap -option terminate:ctrl_alt_bksp

A more permanent solution is to append that line to a file called xinitrc with the command

sudo sh -c "echo -e '\nsetxkbmap -option terminate:ctrl_alt_bksp\n' >> /etc/X11/xinit/xinitrc"

A third option for enabling Ctrl+Alt+Backspace requires access to the desktop:

On KDE, this system-wide setting has no effect. To restore, go to Kickoff > Computer > System Settings which will open up the System Settings window. Click on ‘Input Devices’. In this new window click the Keyboard tab and then click on the advanced tab. In this new window, click the box for ‘Configure keyboard options.’ Expand the entry for ‘Key sequence to kill the X server’ and ensure Control + Alt + Backspace is checked. Click Apply and close the System Settings window. You now have your CTRL-ALT-Backspace back in KDE. ~ source.

Sharing is caring!

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x