Bash (Bourne Again Shell) is the most popular command language interpreter for the GNU operating system. It supports functions, variables, and flow controls and also reads and executes commands from a file. New users of Linux might find it hard to use the shell environment and using the Terminal might look terrible to them. The Bash has a large variety of shortcuts that can make a normal user more productive and efficient. Here we have listed 60 Linux Bash Terminal keyboard shortcuts with their functions.
Ubuntu Terminal Shortcut Key Lists
After completing this pdf we will get to know the whole shortcut key lists of the Ubuntu Terminal. Let us begin the key lists with their functions. We will be covering all the sectors given below:
To master the terminal uses of the Linux operating system, one should first learn how to navigate through the terminal quickly using these shortcuts:
CTRL + A|
Moves to the beginning of the current command line.|
CTRL + E|
Moves to the ending of the current command line.|
ALT + B / ESC + B|
Moves the cursor one word backward from the current cursor position.|
ALT+ F / ESC + F|
Moves the cursor one word forward from the current cursor position.|
CTRL + B / LEFT ARROW|
Moves one character backward from the current cursor position.|
CTRL + F / RIGHT ARROW|
Moves one character forward from the current cursor position.|
CTRL + XX|
Switches between the start of the line and the current cursor position.|
CTRL + ] + A|
Moves the cursor forward to the next character of A.|
ALT + CTRL + ] + A|
Moves the cursor backward to the preceding character of A.|
2. Bash Control/Process
To control the commands and process the terminal, the following shortcuts are the main keys:
CTRL + C|
Stops the currently running command.|
Closes the current terminal.|
CTRL + L|
Similar to the clear command clears the whole terminal screen.|
CTRL + Q|
Resumes suspended commands.|
CTRL + S|
Stops command output to the screen.|
CTRL + Z|
Stops the current command and places it in the background.|
3. Bash History
Learn how to utilize Bash history by adapting these shortcuts:
CTRL + G|
Exits from the history searching mode.|
CTRL + J|
Finishes the history search at the ongoing command line.|
CTRL + O|
Runs the command found in reverse search (Ctrl + S and Ctrl + R)|
CTRL + N / DOWN ARROW|
Shows the next command line.|
CTRL + P / UP ARROW|
Shows the previous command line.|
CTRL + R|
Searches the history backward from the current line.|
CTRL + _|
Undo the last action.|
ALT + P|
Searches the history forward from the current line.|
Runs the previous command.|
Runs the previous command excluding its initial word.|
Shows anything ending with :b|
Runs the recent command that starts with b.|
Shows the b command and put it in history.|
!$ / ALT + .|
Shows the last argument of the latest command.|
Shows any word that “!&” replaces.|
Replaces the initial argument of the previous command in the present one.|
Replaces PQR with XYZ in the last command.|
Runs arguments within a range.|
Executes nth command from the bash history.|
Prints the previous command starting with b.|
Repeats arguments from nth to the last command.|
4. Bash Editing
Editing is the most important aspect of a power user. These shortcuts will help you to get the most out of Bash:
CTRL + D|
Deletes the character under the cursor.|
CTRL + H|
Deletes the previous character under the cursor, it works the same as backspace.|
CTRL + K|
Removes everything after the cursor to the end.|
CTRL + U|
Removes everything before the cursor to the beginning.|
CTRL + W|
Removes the word before the cursor.|
CTRL + I|
Completes the command automatically.|
CTRL + Y|
Retrieve the most recently killed text. Also called Yanking|
ALT + D/DELETE|
Removes from the cursor to the end of the word.|
Swaps the current argument with the previous one.|
ALT + BACKSPACE|
Removes the preceding word.|
ALT + >|
Goes to the initial line of the history page.|
Goes to the final line of the history page.|
ALT + . / ESC + .|
Displays the final argument of the last command.|
ALT + U|
Makes uppercase letters from the current position to the end of the word.|
Makes lowercase letters from the current position to the end of the word.|
ALT + R|
Undo all changes to the current line.|
ALT + CTRL+ E|
Dilates the current command line.|
5. Bash Information
Use the following shortcuts to manage the Bash Information:
Completes the existing file/folder name automatically|
~ TAB TAB|
Shows the total list of every user.|
ALT + ?|
Shows the file/folder names in the current path as help.|
ALT + *|
Shows the file/folder names in the current path as parameters.|
$ TAB TAB|
Shows every system variable.|
@ TAB TAB|
Shows all the entities in the /etc/hosts file.|
Takes back to the previous folder.|
Ubuntu Keyboard Shortcuts Not Working
The most efficient users always use the shortcut keys while using the terminal. It is tough to take when these Ubuntu keyboard shortcuts are not working properly. Here, We have listed some of those problems and tried to give some solutions to those problems as well.
Sometimes the meta(super) keys and a few shortcut keys like these do not work properly. For example:
CTRL+ ALT + T = NOT WORKING
FN + ANY ARROWS = NOT WORKING
SHIFT + DELETE = NOT WORKING
CTRL + C/T/V/X = NOT WORKING
1. First Possible Solution
We can run a sudo command via our terminal:
sudo apt-get remove appmenu-qt5
sudo apt-get remove --auto-remove appmenu-qt5
Then we can log out from the current session. Logging in next will solve the problem.
2. Second Possible Solution
Some packages might be missing while installing the operating system. Using this command you can solve the issue here:
sudo apt install openbox-lxde-session
sudo openbox-lxde --reconfigure
3. Third Possible Solution
We can get back to our default desktop settings by removing the gnome configuration directory. Just use the below command on the desktop terminal to REMOVE it:
rm -rf .gconf/
Now restart your machine. I hope it will work this way.
We have given more than 60 Linux Bash Terminal keyboard shortcuts. Their functions are described here as well. It will speed up your command line uses for sure. We have also given some troubleshooting to the problems you might face while using these shortcut keys. This will be super helpful for all levels of users of Linux OS.
People Also Ask
What are the shortcuts for bash?
Some of the Bash keyboard shortcuts for control/process are:
CTRL + C: Stops the currently running command.
CTRL+ D: Closes the current terminal.
CTRL + L: Similar to the clear command clears the whole terminal screen.
CTRL + Q: Resumes suspended commands.
CTRL + S: Stops command output to the screen.
CTRL + Z: Stops the current command and places it in the background.
What is the shortcut key for terminal in Linux?
The shortcut key for the terminal is CTRL+ALT+T. Pressing this key will open up your terminal instantly on your Linux operating system.
How do I ask for help in Linux terminal?
The easiest way to ask for help in a Linux terminal is by typing the command option --help
with any command you want to learn more about. For example, to learn more about the cat command just type cat --help
What is Ctrl K in Ubuntu terminal?
In the Ubuntu terminal, the CTRL+K keyboard shortcut is used to cut text in the command line interface. When you press this shortcut, it deletes all the text from the cursor position to the end of the line and saves it to a clipboard.
What is super key in Linux?
In Linux, the ‘Super key’ refers to the key that is often adorned with the Windows logo or a penguin (Tux, the Linux mascot) on Linux-specific keyboards. On most keyboards, this key is labeled ‘Super’ or ‘Win’.