Emacs or Vi mode
For BashShell use
set -o emacs
set -o vi
For ZshShell use
bindkey -e # emacs
bindkey -v # vi
Emacs mode cheat sheet
Ctrl-A # go to start
Ctrl-E # go to end
Ctrl-K # cut from cursor to end of line
Ctrl-Y # paste
Vi mode cheat sheet
Basically it works like vi.