-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathBASHshortcuts.txt
More file actions
80 lines (42 loc) · 2.41 KB
/
BASHshortcuts.txt
File metadata and controls
80 lines (42 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
List Of Useful Bash Keyboard Shortcuts
ALT key shortcuts
1. ALT+A – Go to the beginning of a line.
2. ALT+B – Move one character before the cursor.
3. ALT+C – Suspends the running command/process. Same as CTRL+C
4. ALT+D – Closes the empty Terminal (I.e it closes the Terminal when there is nothing typed). Also deletes all chracters after the cursor.
5. ALT+F – Move forward one character.
6. ALT+T – Swaps the last two words.
7. ALT+U – Capitalize all characters in a word after the cursor.
8. ALT+L – Uncaptalize all characters in a word after the cursor.
9. ALT+R – Undo any changes to a command that you have brought from the history if you’ve edited it.
10. ALT+. (note the dot at the end) – Use the last word of the previous command.
CTRL key shortcuts
1. CTRL+A – Quickly move to the beginning of line.
2. CTRL+B – To move backward one character.
3. CTRL+C – Stop the currently running command
4. CTRL+D – Delete one character backward.
5. CTRL+E – Move to the end of line
6. CTRL+F – Move forward one character
7. CTRL+G – Leave the history searching mode without running the command.
8. CTRL+H – Delete the characters before the cursor, same as BASKSPACE.
9. CTRL+J – Same as ENTER/RETURN key.
10. CTRL+K – Delete all characters after the cursor.
11. CTRL+L – Clears the screen and redisplay the line.
12. CTRL+M – Same as CTRL+J or RETURN.
13. CTRL+N – Display next line in command history.
14. CTRL+O – Run the command that you found using reverse search i.e CTRL+R.
15. CTRL+P – Displays the previous line in command history.
16. CTRL+R – Searches the history backward (Reverse search).
17. CTRL+S – Searches the history forward.
18. CTRL+T – Swaps the last two characters.
19. CTRL+U – Delete all characters before the cursor (Kills backward from point to the beginning of line).
20. CTRL+V – Makes the next character typed verbatim
21. CTRL+W – Delete the words before the cursor.
22. CTRL+X – Lists the possible filename completions of the current word.
23. CTRL+XX – Move between start of command line and current cursor position (and back again).
24. CTRL+Y – Retrieves last item that you deleted or cut.
25. CTRL+Z – Stops the current command. You can resume it with fg in the foreground or bg in the background.
26. CTRL+[ – Equivalent to ESC key.
Miscellaneous
1. !! – Repeats the last command.
2. ESC+t – Swaps the last two words.