Bash keyboard shortcuts

Bash keyboard shortcuts

Movement keyboard shortcuts

ShortcutAction
[Ctrl]+[a]jump the cursor to the start of the command line
[Ctrl]+[e] jump the cursor to the end of the command line
[Ctrl]+[xx] toggle between start of command line and current cursor position (and back again)
[Ctrl]+[f]move forward one character
[Ctrl]+[b]move backward one character

Editing keyboard shortcuts

</tr> </tr> </tr> </tr> </tr> </tr> </tr> </table> ### history-related keyboard shortcuts
ShortcutAction
[Ctrl]+[k]</td>delete from cursor position until the end of the command line
[Ctrl]+[u]</td>delete from cursor position until the start of the command line
[Ctrl]+[w]</td>delete from cursor position until the start of word
[Ctrl]+[d]</td>delete character under the cursor position
[Ctrl]+[h]</td>delete character before the cursor position
[Ctrl]+[y]</td>paste text that has been cut using a deletion shortcuts after the cursor position
[Ctrl]+[t]</td>swap the character under cursor with the previous one
</tr> </tr> </tr> </tr> </table> ### Other useful Shortcuts
ShortcutAction
[Ctrl]+[r]</td>enter a history search mode
[Ctrl]+[g]</td>exit a history search mode
[Ctrl]+[p]</td>in history search mode - scroll to the previous command
[Ctrl]+[n]</td>in history search mode - scroll to the next command in history
</tr> </tr> </tr> </tr> </tr> </table>
ShortcutAction
[Ctrl]+[l]</td>clear the screen
[Ctrl]+[s]</td>stops a command verbose mode
[Ctrl]+[q]</td>restore a stopped command verbose mode
[Ctrl]+[c]</td>terminate the current command
[Ctrl]+[z]</td>suspend or stop the command
DevOps Fullstack Tech Leader

DevOps Group