- Ctrl+U : This clears the entire line so you can type in a completely new command.
- Ctrl+K : This deletes the line from the position of the cursor to the end of the line.
- Ctrl+W : This deletes the word before the cursor only.
- Ctrl+R : This lets you search your command history for something specific. another press to browse in history
- Ctrl+A : Go to beggining of line
- Ctrl+E : Go to end of line
- Ctrl+L : clear the screen
- Ctrl+S : stops output to screen
- Ctrl+Q : resume output to screen
- Ctrl+C : sends an INT signal. Causes the process to terminate
- Ctrl+Z : sends a TSTP signal. Causes the process to suspend execution
- Ctrl+T : sends an INFO signal. Causes the operating system to show information about the running command
- Ctrl+\ : sends a QUIT signal. Causes the process to terminate and dump core
cd -: This will move you back to your last working directory:- !! : represent the last command you ran. Ex:
sudo !! !cat: run the last command that used cat!cat:p: see what the last cat command was- !$ : represents the arguments from your last command. Ex:
mkdir /new/folder && cd !$ cat $(which rm):catthe result ofwhich rmmv /path/to/file.txt /path/to/file.xml==mv /path/to/file.{txt,xml}cp /etc/rc.conf{,-old}==cp /etc/rc.conf /etc/rc.conf-oldmv /etc/rc.conf{-old,}==mv /etc/rc.conf-old /etc/rc.confmkdir myfolder{1,2,3}==mkdir myfolder1 && mkdir myfolder2 && mkdir myfolder3