no quiz required
Announcement
You can find all my latest posts on medium.Here are some handy tips and tricks you can perform inside the bash terminal to help you speed up productivity
Retrieve and run an earlier command
This is done in few ways:
- By pressing up and down to scroll through previously run commands
- Hold down
ctrl+r
, this will bring up the “reverse-i-search” prompt. You can then type a part of the command, and this prompt will automatically return the most recent match from your command history, You can scroll back to earlier matches by doingctrl+r
repeatedly - Using the “!{command}” notation. this will run the last matching command what ever that was. This is particurly handy for running long unwieldy commands, e.g. “!scp”
- Use
history
command – this will output a list of your previously run commands. You can then run a command by copy+pasting one of your historical commands. Or you can run !{history number}
Command editing shortcuts
While on the command line you can do the following:
Ctrl+a
(or thehome
key ) : jump to the line’s beginningCtrl+e
(or theend
key) : Jump to end of lineCtrl+u
: delete everything from start of line to cursorCtrl+k
: delete everything from the cursor to end up lineCtrl+LeftArrow
: go to the next word on the command lineCtrl+RightArrow
: go to the previous word on the command line- Press
tab
key twice midway through writing a command, this will try to autocomplete your command.