Skip to content

Instantly share code, notes, and snippets.

@eggman64
Created March 15, 2017 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eggman64/99231fe80b4ea64b5dc9e62e47cd9b1d to your computer and use it in GitHub Desktop.
Save eggman64/99231fe80b4ea64b5dc9e62e47cd9b1d to your computer and use it in GitHub Desktop.
bash-emacs
navigation without arrow keys:
C-p, C-n, C-f, C-b
(previous, next, forward, backward)
navigating faster:
C-a, C-e, A-f, A-b
("anfang" ;-), end, forward, backward)
editing without remote keys:
C-h
editing faster:
C-w, A-backspace, A-d, C-u, C-k, C-y, A-.
(y for yank, the 1980 lingo for paste)
clear terminal while editing:
C-l
recalling things:
!!, !$
searching in history:
C-r (then ESC, C-f)
bash job control:
C-z, fg, bg, jobs, &
undoing:
C-x C-u, A-r
editing in external editor:
C-x C-e
note about password prompts:
C-u works as well!
substitution of last command:
^foo^bar
stop/restart job:
C-s, C-q
terminal messed up:
reset
end ssh client:
\n~.
netcat file transfer:
nc -l -p 3000 > filename # "server"
nc hostname 3000 < filename # "client"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment