Linux Commands
Commands for terminal efficiency
Command
Output
Example
!!
Puts last run command on the current line of your terminal (useful for when you forget to add sudo to a command)

!<command>
Executes last command run that started with <command>

!$
Executes the last word of the previous command

cd -
Changes directory to previous directory

cd ~/
Changes directory starting from the user's home directory

ctrl + k
Cuts to the end of the line
N/A
ctrl + y
Pastes cut text (see previous command)
N/A
ctrl + x + e
Opens your current line in your text editor (helpful for scripting or long commands)
N/A
ctrl + w
Go back one word (space delimited)
N/A
alt + .
Pastes in the argument used for the last command
N/A
Generally useful software
Last updated
Was this helpful?