[Quick Tip] Drag and Drop Pasting File / Folder Path into Terminal

Familiar with Linux commands? You may already know many tips and tricks that will save you a lot of time.

Here are some that I have been using for a long period of time, including Tab auto-completion, when you type something in Linux terminal and hit Tab, it auto-completes the command or file path, or outputs all possible options.

And Ctrl+Shift+V will do paste text to terminal instead of Ctrl+V. Without copying to the clipboard, you can simply select / highlight the text and use mouse middle-click to paste into terminal.

Today I found a new terminal tips that I didn’t know before. Thanks to the reddit, I’m going to share it with you by following steps.

1. Drag and drop file or folder to paste the path into terminal.

Just drag and drop a file or folder into terminal, and you’ll see the full path pasted with single quotes. It’s useful if there’s special character in file path or you just don’t want to type …

2. Drag and drop a selection of text into terminal.

You can also drag and drop a selection of text into terminal, so you don’t need to do copy and paste with context menu clicks or keyboard shortcuts.

Original Article