Select what you want to copy, then use the middle button of your mouse to paste. If you don't have a middle button, try pressing both mouse buttons at once.
In any case, CtrlV isn't supposed to work. The shortcut for pasting into a terminal after having copied with CtrlC is ShiftInsert
There is a set of shortcuts for terminal , and they are organized around the current cursor position.
- You can use CtrlK shortcut to cut the text from cursor to end of line
- CtrlU cuts from current position to beginning of line.
- Paste with CtrlY
These two are pretty useful in particular when you want to either copy the command or its arguments.
If you are proficient with vim
text editor, you can edit the command you want in a more powerful way by evoking vim
with fc
command.
For using the command outside the terminal, you might want to use xclip
command (not installed by default) . For instance,
$ echo "some_command" | xclip -sel clip
Once you have xclip
you can add the following function to your .bashrc
file
to_clipboard() {
xclip -sel clip <<<"$@"
}
What this does is it will copy whatever you put in front to clip board. You can use that in combination with the shortcuts above to cut test, paste it in front of the function, and it will be added to your clipboard. Small example
$ to_clipboard echo 'hello world'
Best Answer
I hope these shortcuts are useful