X

Linux Terminal Shortcut Cheat Sheet

Using the Linux terminal, you can be more productive and fast to complete the task by the knowledge of the terminal shortcut commands. By using the terminal shortcut commands, you can accomplish the required task within a short period of time compared to a normal user who does not use shortcuts.

There are many such terminal shortcut commands. Be sure to master those shortcuts to be a better linux user. Such commands can be used on Shell-like Bash which is also available by default on Linux distributions such as Ubuntu.

In this article, we are going to show such terminal shortcut commands on Ubuntu 20.04 LTS server. We are going to elaborate on those commands on the following points.

Linux Terminal Shortcuts

Ctrl + Alt + T

Pressing Ctrl + Alt + T opens a new command line terminal window as shown in the following screenshot.

Ctrl + A

It is the most common shortcut command that you must know. Suppose you typed something on your terminal, then you noticed you have to go to the beginning of the line then this command comes in handy. You can press CTRL + A, which will put your cursor to the beginning of the line. You can also press the Home key on the keyboard instead of ctrl + A.

Ctrl + E

This shortcut is used in case you want to go to the end of the line. Suppose you are at the beginning of the line then you want to go to the end. Then pressing this shortcut puts the cursor to the end of the line. So it is quite the opposite of the ctrl + A command. You can also press the End key on the keyboard instead of ctrl + E.

Alt + F

If you want to go one word forward, then pressing Alt + F helps you do that.

Alt + B

If you want to go one word backward, then pressing Alt + B helps you do that.

Tab key

It is the most used key in Linux command line Terminal. Pressing the tab key will autofill the matched item or provide the option to the users.

Ctrl + F

If you want to go a single character forward, then pressing Ctrl + F helps you do that.

Ctrl + B

If you want to go single character backward, then pressing Ctrl + B helps you do that.

Ctrl + T

Suppose you are trying to write “ls” to list the files but in a hurry you have written “sl”. Then pressing Ctrl + T exchanges the current cursor position by changing the character too. So as a result, after pressing ctrl + T, you will get “ls”.

Ctrl + XX

Pressing Ctrl + XX repeatedly toggles between the current cursor position and starting of the command line.

Ctrl + L

In case you want to clear the terminal window, press Ctrl + L. Using this shortcut, you get the option to see your previous screen too by scrolling down.

Ctrl + D

It is similar to the exit command on the command line terminal. Instead of typing exit, you can just press Ctrl + D which closes the running window of the terminal or log out of the server using “ssh” connection.

Ctrl + P

Pressing the Ctrl + P on the terminal, you get to see your previous command that you have typed or run.

Ctrl + N

Pressing the ctrl + N on the terminal, you get to see the next command that you have typed or run. It is the opposite of the Ctrl +P command.

Ctrl + R

By pressing the ctrl + R, you can search the history of the command that you have previously run.

Ctrl + C

If you want to stop a running program, then you can just press Ctrl + C which will stop and end the program session.

Ctrl + Z

To send the running program in the background, press Ctrl + Z. Press fg to get back that program.

Ctrl + W

Pressing the Ctrl + W, it will delete a single word on the terminal.

Ctrl + U

If you want to clear the command that you mistakenly typed, press Ctrl + U. It will put the cursor to the beginning of the command line erasing all the commands.

Ctrl + K

If you want to delete all the commands to the end of line from your current cursor position, press Ctrl + K .

Ctrl + Y

Suppose you mistakenly erased some command which you previously typed, to get it back just press Ctrl + Y which will paste the previous command.

Alt + L

If you want to convert all the characters from the current cursor to the end of the command line to lowercase, then pressing Alt + L helps you do that.

Alt + U

If you want to convert all the characters from the current cursor to the end of the command line to Uppercase, then pressing Alt + U helps you do that.

Ctrl + J

This shortcut command is similar to pressing the Enter key. In case you have a damaged Enter key, you can type Ctrl + J which is similar to Enter key.

Ctrl + Q

It is the same as pressing Alt + F4. Pressing Ctrl + Q will quit the running program but it does not work on some default programs such as terminal on Linux.

Conclusion

Linux terminal shortcut commands are very essential for Linux regular and power users. Practice more and be fluent with the above shortcut commands to do and complete tasks by saving a lot of time and trouble.

Karim Buzdar: About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various websites.
X

Headline

You can control the ways in which we improve and personalize your experience. Please choose whether you wish to allow the following:

Privacy Settings