I'm interested to know if there is any way to copy a line from a file and place it in the next terminal's command line.

This line would be the next command or a fraction of it, being possible to still edit in the command line.

And, of course, everything throught the terminal.

Regards, Vinicius SIlva


Usually just highlighting the line with the mouse (left click) will automatically copy it to the clipboard. Then switch over to the other terminal and paste it with either the right or center(scrollwheel) mouse button.

Depending on the console you may need to use keyboard shortcuts instead. Highlight with the mouse and then try CTRL-SHIFT-C to copy and CTRL-SHIFT-V to paste.


As far as I know this is not possible - there are no shell commands which emulate the kill-line and similar "commands" which cut and paste on the command line. Related question about clearing the kill buffer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.