Last run commands
Traverse the history in
or if you forget
sudo, reference the last command using
Search last commands
Ctrl+R will toggle inverse search in your history.
Arguments of last successfull command
tailand hit Alt+. to get the last argument.
Exit a program
Ctrl+C will normally exit any shell program.
Exit code of last run command
echo $? will show the exit code of the last run command.
Paste from clipboard
Ctrl+Shift+V pastes clipboard content to the terminal.
- Ctrl+K cuts characters right to the cursor
- Ctrl+U cuts characters left to the cursor
- Ctrl+Y bring back last cut characters
When starting a line like a loop:
you can hit Ctrl+X+E to open a buffer in your editor (
echo $EDITOR). Complete the code with
Go to the home directory
Change to the home directory of
Go back to last directory
cd - will go back to the last directory
End of file
Display the end of a logfile following new incoming data:
- Hit Ctrl+C to detach from the end of the file to scroll up.
- Hit Shift+F to glue to the end.
Display last 100 lines of a file with
Reset the terminal when behaving wierd
reset wil reset the terminal, which can be used instead of closing the terminal.
Erstellt: December 15, 2022