Virtual Console RedHat

Hi all,

I am new to this forum, I have been searching on how I can select text in a virtual console in RedHat without any luck, I would liek to select the text without using a mouse, just with keyboard, not only to select text but to move around the lines, I know Shift+PageUP will scroll up and Shif+PageDown will scroll down, but I would like, let's say to move one line above and see where is the cursor, hope I make myself clear.

Note: Something like in vim, using h,j,k,l to move one line at a time.
Thanks in advance,

When you say "virtual console" what are you referring to? Is the server running under VMWare, Hyper-V or the like, or are you at the GUI console of a desktop server and have opened a console window?

When you are looking to cut/copy/paste, where do you want to cut/copy/paste to/from?

If you are editing a file with vi or vim, you can place the cursor on the line to be cut/copied and type (in command mode) dd to cut or Y to copy the line. If you need to cut/copy a block, you can specify the number of lines involved from the current line, so 3dd will cut the current and next two lines, 20Y will copy the current and next 19 lines.

To paste it in, you have a choice, p or P. The lower case pastes after the current line that the cursor is on. The upper case pastes before the current line that the cursor is on.

Is this what you need, or have I completely missed the point? :confused:

I hope that this helps,
Robin

1 Like

Or do you want to 'copy' text that an application 'spits' out?
In that case, redirect the output similar to:

prog-with-desired-output > ~/copied_text.txt

As in:

grep -i term /etc/default/grub > ~/values-that-match-term.txt

hth

Thanks for the replies, I apologize if I didn't make myself clear, by virtual console I ment when you use Alt+F2 or any other F* to go to console alone, in there i would like to select text not actually copy paste it, but let's say if i want to show and highlight some text in the console, hope it's clear.

Thanks

The screen package/command might help you.

Do you mean set the text to bold, underline, reverse video or blinking? It might be possible to even use colours if your terminal supports it (especially on the GUI console)

Robin

Let me put this question from another direction:
Why, for what reason, do you want to mark/higlight text there?
What is the purpose of selecting text, without any further action, such as copy'ing or pipe it?

If it is for screenshots, there's much less trouble doing so in a terminal window of your prefered GUI.

Might this be a homework assignment?

1 Like

Are you able to do what you wish to do in a regular terminal window or are you only encountering this problem in a virtual terminal?

Actually, Linux supports a number of virtual consoles. That is what the OP is talking about.