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 2 – Vim 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“.

ActionCommandAlternative WinAlternative Mac (iTerm2)
Navigation
Move the cursor back one characterCTRL+ BArrow LeftArrow Left
Move the cursor forward one characterCTRL+ FArrow RightArrow Right
Move cursor back one wordALT + BCTRL+ Arrow LeftOpt+ Arrow Left
Move cursor forward one wordALT + FCTRL+ Arrow RightOpt+ Arrow Right
Move cursor to the beginning of the lineCTRL+ AHomeFn+ Arrow Left
Cmd + Arrow Left
Move cursor to the end of the lineCTRL+ EEndFn + Arrow Right
Cmd + Arrow Right
Editing
Delete one character from cursor to the leftCTRL + HBackspaceBackspace
Delete one character from cursor to the rightCTRL + DDELFn + Backspace
Delete word from cursor the the leftCTRL+ WALT + BackspaceOpt + Backspace
Delete word from cursor the the rightALT + DCTRL + DelFn + Opt +Backspace
Delete from cursor to the start of the lineCTRL+ UCmd + Backspace
Delete from cursor to the end of the lineCTRL+ K
Swap two charsCTRL + T
Swap two wordsALT + T
Cancel current commandCTRL + C
Misc
Close the current terminalCTRL + D
Undo last changeCTRL + Shift + _

Useful links

Handy Keyboard Shortcuts for the Linux Bash Terminal

Use These Keyboard Shortcuts to Quickly Move Around in Bash

iTerm2 Terminal for MacOS

MacOS built-in Terminal Shortcuts


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *