60 Bash Terminal Keyboard Shortcuts in Linux [Free PDF Download]

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:

  • Bash Navigation
  • Bash Control/Process
  • Bash History
  • Bash Editing
  • Bash Information

1. Bash Navigation

To master the terminal uses of the Linux operating system, one should first learn how to navigate through the terminal quickly using these shortcuts:

Serial No. Shortcut Keys Functions
1. CTRL + A Moves to the beginning of the current command line.
2. CTRL + E Moves to the ending of the current command line.
3. ALT + B / ESC + B Moves the cursor one word backward from the current cursor position.
4. ALT+ F  / ESC + F Moves the cursor one word forward from the current cursor position.
5. CTRL + B / LEFT ARROW Moves one character backward from the current cursor position.
6. CTRL + F / RIGHT ARROW Moves one character forward from the current cursor position.
7. CTRL + XX Switches between the start of the line and the current cursor position.
8. CTRL + ] + A Moves the cursor forward to the next character of A.
9. 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:

Serial No. Shortcut Keys Function
1. CTRL + C Stops the currently running command.
2. CTRL+ D Closes the current terminal.
3. CTRL + L Similar to the clear command clears the whole terminal screen.
4. CTRL + Q Resumes suspended commands.
5. CTRL + S Stops command output to the screen.
6. 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:

Serial No. Shortcut Keys Function
1. CTRL + G Exits from the history searching mode.
2. CTRL + J Finishes the history search at the ongoing command line.
3. CTRL + O Runs the command found in reverse search (Ctrl + S and Ctrl + R)
4. CTRL + N / DOWN ARROW Shows the next command line.
5. CTRL + P / UP ARROW Shows the previous command line.
6. CTRL + R Searches the history backward from the current line.
7. CTRL + _ Undo the last action.
8. ALT + P Searches the history forward from the current line.
9. !! Runs the previous command.
10. !* Runs the previous command excluding its initial word.
11. !*:b Shows anything ending with :b
12. !b Runs the recent command that starts with b.
13. !b:p Shows the b command and put it in history.
14. !$ / ALT + . Shows the last argument of the latest command.
15. !$:b Shows any word that “!&” replaces.
16. !^ Replaces the initial argument of the previous command in the present one.
17. ^PQR^XYZ Replaces PQR with XYZ in the last command.
18. !n:m Runs arguments within a range.
19. !n Executes nth command from the bash history.
20. !n:b Prints the previous command starting with b.
21. !n:$ 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:

Serial No. Shortcut Keys Function
1. CTRL + D Deletes the character under the cursor.
2. CTRL + H Deletes the previous character under the cursor, it works the same as backspace.
3. CTRL + K Removes everything after the cursor to the end.
4. CTRL + U Removes everything before the cursor to the beginning.
5. CTRL + W Removes the word before the cursor.
6. CTRL + I Completes the command automatically.
7. CTRL + Y Retrieve the most recently killed text. Also called Yanking
8. ALT + D/DELETE Removes from the cursor to the end of the word.
9. ALT+ T Swaps the current argument with the previous one.
10. ALT + BACKSPACE Removes the preceding word.
11. ALT + > Goes to the initial line of the history page.
12. ALT+ > Goes to the final line of the history page.
13. ALT + . / ESC + . Displays the final argument of the last command.
14. ALT + U Makes uppercase letters from the current position to the end of the word.
15. ALT+ L Makes lowercase letters from the current position to the end of the word.
16. ALT + R Undo all changes to the current line.
17. ALT + CTRL+ E Dilates the current command line.

5. Bash Information

Use the following shortcuts to manage the Bash Information:

Serial No. Shortcut Keys Function
1. TAB Completes the existing file/folder name automatically
2. ~ TAB TAB Shows the total list of every user.
3. ALT + ? Shows the file/folder names in the current path as help.
4. ALT + * Shows the file/folder names in the current path as parameters.
5. $ TAB TAB Shows every system variable.
6. @ TAB TAB Shows all the entities in the /etc/hosts file.
7. CD – 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.

Conclusion

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’.

5/5 - (8 votes)
Borhan Uddin

Hello, I am Borhan Uddin, a resident of Dhaka, Bangladesh. I have completed my undergraduate degree in Electrical and Electronic Engineering (EEE) from Chittagong University of Engineering and Technology (CUET). I love to spend my leisure by playing and watching various movies & dramas. Currently, I am working as a Linux Content Developer Executive here. I would like to learn more about Linux every day of the week and would be keen to share it with you rapidly. Read Full Bio

Leave a Comment