To prepare for the Certified Kubernetes Administrator (CKA) exam, basic Linux skills are a necessity. Being able to move the cursor around quickly in the Bash shell and Vim, create aliases and handy environment variables helps saving precious time during the CKA exam.
Of course there are plenty of cheat sheets around, but creating one yourself that has the commands you like and use, forces you to learn them. I started this series to have cheat sheets of my own that have the generic commands, but also the specific ones for my Windows and MacOS devices if any.
While I was progressing it made sense to share my preparations, so hopefully it serves you well. If so, please like the series at the bottom.
The CKA prep series
Part 1 – Bash cheat sheet
Part 3 – Kubectl time savings (in progress)
Bash
This section is about navigating in Bash. On my Mac I use iTerm2 instead of the built-in Terminal and use key mapping preset “Natural Text Editing“.
Action | Command | Alternative Win | Alternative Mac (iTerm2) |
Navigation | |||
Move the cursor back one character | CTRL+ B | Arrow Left | Arrow Left |
Move the cursor forward one character | CTRL+ F | Arrow Right | Arrow Right |
Move cursor back one word | ALT + B | CTRL+ Arrow Left | Opt+ Arrow Left |
Move cursor forward one word | ALT + F | CTRL+ Arrow Right | Opt+ Arrow Right |
Move cursor to the beginning of the line | CTRL+ A | Home | Fn+ Arrow Left Cmd + Arrow Left |
Move cursor to the end of the line | CTRL+ E | End | Fn + Arrow Right Cmd + Arrow Right |
Editing | |||
Delete one character from cursor to the left | CTRL + H | Backspace | Backspace |
Delete one character from cursor to the right | CTRL + D | DEL | Fn + Backspace |
Delete word from cursor the the left | CTRL+ W | ALT + Backspace | Opt + Backspace |
Delete word from cursor the the right | ALT + D | CTRL + Del | Fn + Opt +Backspace |
Delete from cursor to the start of the line | CTRL+ U | Cmd + Backspace | |
Delete from cursor to the end of the line | CTRL+ K | ||
Swap two chars | CTRL + T | ||
Swap two words | ALT + T | ||
Cancel current command | CTRL + C | ||
Misc | |||
Close the current terminal | CTRL + D | ||
Undo last change | CTRL + Shift + _ |
Useful links
Handy Keyboard Shortcuts for the Linux Bash Terminal
0 Comments