Bash and Zsh Keyboard Shortcuts

B

Keyboard shortcuts save steps and knowing these few shortcuts when working on the command-line can save a lot of time and typing.

Ctrl-A: Moves to the beginning of the current line
Ctrl-E: Moves to the end of the current line
Alt-F: Moves the cursor forward one word on the current line
Alt-B: Moves the cursor backwards one word on the current line

Ctrl-U: Clears the characters on the line before the current cursor position
Ctrl-K: Clears the characters on the line after the current cursor position (Bash)Ctrl-U: Clears the entire line (zsh)

Ctrl-W: Deletes the word in front of the cursor
Alt-D: Deletes the word after the cursor

Alt-U: Makes the current word after the cursor uppercase
Alt-L: Makes it lowercase
Alt-C: Capitalizes the letter after the cursor

Similar Posts:

About the author

Alvin Poh

I've over 17 years of entrepreneurship experience, having built a tech company to be the top in the country, which was subsequently acquired for an 8-figure sum. As CEO, I led the company through robust growth to 150 employees across 4 countries. After the acquisition, I embraced minimalism, sold off my personal possessions, and started living around the world.

Read more about my story here.

Add comment

By Alvin Poh

About Author

I've over 17 years of entrepreneurship experience, having built a tech company to be the top in the country, which was subsequently acquired for an 8-figure sum. As CEO, I led the company through robust growth to 150 employees across 4 countries. After the acquisition, I embraced minimalism, sold off my personal possessions, and started living around the world.

Read more about my story here.