Skip to content

↑↓ moveEnter openEsc close

Jump between the start of the line and the cursor in Bash

Bash Bash 5.2 / Zsh 5.9 · 36 shortcuts · checked Nov 2026 · Source: GNU Project docs

In Bash and Zsh, press Ctrl+X Ctrl+X on Mac, Linux, Windows.

A chord: press each combination in turn.

More Bash shortcuts: moving the cursor

ActionMacLinuxWindows
Go to the start of the lineCtrlACtrlACtrlA
Go to the end of the lineCtrlECtrlECtrlE
Back one wordOptionBAltBAltB
Forward one wordOptionFAltFAltF
Back one characterCtrlBCtrlBCtrlB
Forward one characterCtrlFCtrlFCtrlF

All 36 Bash shortcuts