When you enter a long command into the Terminal window that you found on the web or in a document, you can save yourself some time by easily copying and pasting the command at the prompt.
Update: Read our in-depth guide to copy-pasting text at the Linux command-line for more detailed tips and tricks.
To begin, highlight the text of the command you want on the webpage or in the document you found. Press Ctrl + C to copy the text.
Press Ctrl + Alt + T to open a Terminal window, if one is not already open. Right-click at the prompt and select “Paste” from the popup menu.
The text you copied is pasted at the prompt. Press Enter to execute the command.
The command is executed like you typed in yourself.
You can also copy text from the Terminal window to paste into other programs. Simply highlight the text, right-click on it, and select “Copy” from the popup menu. You can paste this text into a text editor, word processor, etc.
When pasting a copied command into the Terminal window, you can use the arrow keys to navigate through the command and use the backspace key to delete text and retype it, if desired. This is useful if you want to copy a long command that has placeholders for certain parts of the command. You can easily change those to customize the command to your needs.
- › How to Copy Files and Directories in the Linux Terminal
- › Tablet vs. eReader: Which Is Better for Ebooks?
- › Microsoft PowerPoint Has a New List Feature on the Web
- › What Is a Discord Token, and How Do You Get One?
- › Did Your Code Project Just Break? It Might Be GitHub’s Fault
- › Grab a 256GB Surface Laptop Go 2 for Just $550 Today
- › The Framework Laptop 16 Has an Upgradeable GPU