How to: Use shortcut keys/Key combinations in Linux Terminal

1 Tab

When entering command, enter beginning of the command, file name or folder name or command option then press “Tab” key, it will complete the rest for you automatically or show all possible results.

2 Ctrl + C

Terminate/Kill the command or process, it will terminate the running process immediately. (signal SIGINT). It can be intercepted by a program, thus the program can clean itself up before exiting or not exit at all.

3 Ctrl + Z

Suspending a process by sending the SIGSTOP signal, it cannot be intercepted by the program.

4 Ctrl + D

Exit the current terminal. If you are using SSH, it will close it. If you are using a terminal directly, it will close the terminal window.

5 Ctrl + L

Clear terminal screen, same effect as “clear” command

6 Ctrl + A

Move the type cursor to the beginning of the line (Same as pressing “Home” key on keyboard)

7 Ctrl + E

Move the type cursor to the end of the line (Same as pressing “End” key on keyboard)

8 Ctrl + U

Wipe the line and move the type cursor to the beginning of the line (Instead of use “Backspace” key to clear the line slowly)

9 Ctrl + K

Wipe the content from the type cursor to the end of the line

10 Ctrl + W

Clear a word

Before Ctrl + W

Before Ctrl + W
Before Ctrl + W

After Ctrl + W

After Ctrl + W
After Ctrl + W

11 Ctrl + Y

It will paste text removed by Ctrl + U, Ctrl + U and Ctrl + K. If you have deleted text by mistake, this will be helpful.

12 Ctrl + P

Review last command, use repetitively to go back further. Many Terminal provides this review function by PageUp key as well. Some provide the review function by using up arrow key as well (↑).

13 Ctrl + N

Similar usage as Ctrl + P but opposite direction, this command navigate to more recent commands. Many Terminal provides this review function by PageDown key as well. Some provide the review function by using down arrow key as well (↓).

14 Ctrl + R

Used for search history commands

Bonus:

Alternatively, we can use “history” command to show all history command

To search from history command, we can use “history | grep searchTerm”


How to fix: Notepad ++ Shortcut key disappear, not working

The Issue

When closing the file we are editing in Notepad++, it will ask if we want to save the file or not, usually we can use Y, N, C, a, o keys to select intend action.

Notepad++ Save file dialog with shortcut keys
Notepad++ Save file dialog with shortcut keys

Sometimes the shortcut keys can disappear:

Notepad++ Save file dialog without shortcut keys
Notepad++ Save file dialog without shortcut keys

The Fix

1 Open the Notepad++ installation directory

2 Navigate to “Notepad++\localization” folder

3 For English, open the “english.xml” file

4 Find following lines

<DoSaveOrNot title="Save">
	<Item id="1761" name="Save file "$STR_REPLACE$" ?"/>
	<Item id="6" name="Yes"/>
	<Item id="7" name="No"/>
	<Item id="2" name="Cancel"/>
	<Item id="4" name="Yes to all"/>
	<Item id="5" name="No to all"/>
</DoSaveOrNot>

5 Change to

<DoSaveOrNot title="Save">
	<Item id="1761" name="Save file "$STR_REPLACE$" ?"/>
	<Item id="6" name="&amp;Yes"/>
	<Item id="7" name="&amp;No"/>
	<Item id="2" name="&amp;Cancel"/>
	<Item id="4" name="Yes to &amp;all"/>
	<Item id="5" name="N&amp;o to all"/>
</DoSaveOrNot>

6 Save the file, now change Notepad++ to other languages then change back to English, you will be able to see and use those shortcut keys again.

Note: For other languages, just modify the same section

CHANGE

name="Yes"

TO

name="&amp;Y Yes"