Reputation: 147
As mentioned in the title, how can I copy and paste text to Linux command line in a text based Linux server?
Normal Ctrl + Shift + V doesn't work.
Upvotes: 5
Views: 19380
Reputation: 71
I had the same need and managed to solve it using the screen package:
apt-get install screen
When you run screen, it will open a 'virtual shell' where you can run commands and copy/paste the content:
Upvotes: 0
Reputation: 157947
Note: This question is about a terminal, not a terminal emulator. A terminal is what you see when you connect a computer without a graphical desktop to a monitor and keyboard (no mouse supported at that point)
On a text based terminal (not a terminal emulator(!)) copy/paste is not possible.
If possible, I recommend to use ssh
and connect with a terminal emulator which does support copy/paste to that box. For example gnome-terminal could be used for that: https://help.gnome.org/users/gnome-terminal/stable/txt-copy-paste.html
Upvotes: 7
Reputation: 7476
Retro computers have different sets of combination like.
ctrl + insert for copying or yanking.
shift + insert for pasting.
Upvotes: 0
Reputation: 37806
I think you're looking for xclip.
For example, this is how you copy/paste to and from your clipboard:
xclip file.txt -selection clipboard; #copy
xclip -selection clipboard -o; #paste
Although normally avialble on OSX, I noticed that my Ubuntu build also has pbcopy / pbpaste.
It should come to no surprise though, that they are just aliases:
$ which pbcopy
pbcopy: aliased to xclip -selection clipboard
$ which pbpaste
pbpaste: aliased to xclip -selection clipboard -o
Upvotes: 3