Fudging bash
Avoid using cursor keys
- Jump to the beginning : control A (inherited from emacs, kill your pinky)
- Jump to the end: control E (inherited from emacs)
- Clear all after the cursor: control K (kill)
(stolen from this nice one)
Use history
history
history
- search backwards:
- control r and type what you want
- keep pressing control r to see other options
- run previous command again:
!! - if you want a particular history
- run
historyfirst - find a
numberstarting each line that you want !number
- run
Sleep, forground, background
- Stop something is control c. Don't be confused with control s
- make the current one sleep: control s
- see who are sleeping now:
jobs - wake up the sleeping one:
fg - make the one work in the background
bg - List what I am running:
ps - List everything beyond what I have:
ps aux - Kill something: find a process ID (PID). Then
kill -9 PID(-9 means I kill. I mean it) - Kill by name:
killall NAME(sometimes this may be more than what you want)