20 Command line shortcut tips in Linux
Command line shortcuts in Linux for command edit options and other activities.
- Ctrl + a => Return to the start of the command you’re typing
- Ctrl + e => Go to the end of the command you’re typing
- Ctrl + u => Cut everything before the cursor to a special clipboard
- Ctrl + k => Cut everything after the cursor to a special clipboard
- Ctrl + y => Paste from the special clipboard that Ctrl + u and Ctrl + k save their data to
- Ctrl + t => Swap the two characters before the cursor (you can actually use this to transport a character from the left to the right, try it!)
- Ctrl + w => Delete the word / argument left of the cursor
- Ctrl + l => Clear the screen
- tty => Typing the tty command tells you what virtual terminal you’re currently working in.
- Shift + PageUp => Scroll terminal output up.
- Shift + PageDown => Scroll terminal output down.
- Ctrl + l => Does exactly the same as typing the clear command.
- Reset => If you mess up your terminal, use the reset command. For example, if you try to cat a binary file, the terminal starts showing weird characters. Note that you may not be able to see the command when you’re typing it.
- Ctrl + r => Find the last command that contained the letters you’re typing. For example, if you want to find out the last action you did to a file called "file42.txt", you’ll press Ctrl + r and start typing the file name. Or, if you want to find out the last parameters you gave to the "cp" command, you’ll press Ctrl + r and type in "cp".
- Ctrl + c => Kill the current process.
- Ctrl + z => Send the current process to background. This is useful if you have a program running, and you need the terminal for awhile but don’t want to exit the program completely. Then just send it to background with Ctrl+z, do whatever you want, and type the command fg to get the process back.
- Ctrl + d => Log out from the current terminal. If you use this in a terminal emulator under X, this usually shuts down the terminal emulator after logging you out.
- Ctrl + Alt + Del => Reboot the system. You can change this behavior by editing /etc/inittab if you want the system to shut down instead of rebooting.
- Ctrl + Alt + Backspace => Reboot the Graphics.
Advertisement
Categories: Uncategorized