cancel
Showing results for 
Search instead for 
Did you mean: 
  • 2,196 Views

How do I copy and paste text like pod names within the lab environment

Jump to solution

In many of the labs there is a need to copy text from the terminal window, like a pod name and use it in other commands in the terminal window. I am not able to copy and paste text within the terminal window. I have no trouble copying text from the lab guide to the terminal window.

Thanks for any help!

2 Solutions

Accepted Solutions
Travis
Moderator
Moderator
  • 2,192 Views

@jonathanRossi -

You should be able to select it with the mouse in the terminal window (highlighting all the text) and you can use the center button (scroll wheel) as that is a quick hack for copy/paste as it copies what is selected and pastes automatically in the input line.

The other way is selecting it and then right click copy followed by a right-click and paste. Keep in mind shortcut keys work differently in Linux and CTRL-C has a special meaning, so often you must use a combination of keys. This can sometimes be problematic when using the VNC console coming in from other OSes, so mouse is generally best so you don't deal with modifier keys and possible translations of what key combinations mean in each OS.

The other thing that "should" work is that command line completion works, so you should be able to start typing options (including things like Pod names and other Kubernetes/OCP resources) and the command line completion should grab the rest of the name for you. This is done using TAB TAB (pressing the TAB key 2x in succession).

Hope this helps.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training

View solution in original post

  • 2,181 Views

Thank you! The right mouse click to paste works.

View solution in original post

0 Kudos
5 Replies
Travis
Moderator
Moderator
  • 2,193 Views

@jonathanRossi -

You should be able to select it with the mouse in the terminal window (highlighting all the text) and you can use the center button (scroll wheel) as that is a quick hack for copy/paste as it copies what is selected and pastes automatically in the input line.

The other way is selecting it and then right click copy followed by a right-click and paste. Keep in mind shortcut keys work differently in Linux and CTRL-C has a special meaning, so often you must use a combination of keys. This can sometimes be problematic when using the VNC console coming in from other OSes, so mouse is generally best so you don't deal with modifier keys and possible translations of what key combinations mean in each OS.

The other thing that "should" work is that command line completion works, so you should be able to start typing options (including things like Pod names and other Kubernetes/OCP resources) and the command line completion should grab the rest of the name for you. This is done using TAB TAB (pressing the TAB key 2x in succession).

Hope this helps.

Travis Michette, RHCA XIII
https://rhtapps.redhat.com/verify?certId=111-134-086
SENIOR TECHNICAL INSTRUCTOR / CERTIFIED INSTRUCTOR AND EXAMINER
Red Hat Certification + Training
  • 2,182 Views

Thank you! The right mouse click to paste works.

0 Kudos
Jason_R_Preston
Flight Engineer
Flight Engineer
  • 2,176 Views

The method I use most often is to highlight the desired text, then use Shift+Insert to paste the text, no "copy" command needed. This command is built into bash.

Chetan_Tiwary_
Community Manager
Community Manager
  • 2,013 Views

Thanks @Jason_R_Preston !

0 Kudos
Chetan_Tiwary_
Community Manager
Community Manager
  • 2,074 Views

+1 @Travis , you covered and explained all the options very succintly. Kudos !

0 Kudos
Join the discussion
You must log in to join this conversation.