Copy text from nano editor to shell [closed] Copy text from nano editor to shell [closed] linux linux

Copy text from nano editor to shell [closed]


Nano to Shell:

1. Using mouse to mark the text.

2. Right-Click the mouse in the Shell.

Within Nano:

1. CTRL+6 (or CTRL+Shift+6 or hold Shift and move cursor) for Mark Set and mark what you want (the end could do some extra help).

2. ALT+6 for copying the marked text.

3. CTRL+u at the place you want to paste.

or

1. CTRL+6 (or CTRL+Shift+6 or hold Shift and move cursor) for Mark Set and mark what you want (the end could do some extra help).

2. CTRL+k for cutting what you want to copy

3. CTRL+u for pasting what you have just cut because you just want to copy.

4. CTRL+u at the place you want to paste.


For whoever still looking for a copy + paste solution in nano editor

To select text

  • ctrl+6
  • Use arrow to move the cursor to where you want the mark to end

Note: If you want to copy the whole line, no need to mark just move the cursor to the line

To copy:

  • Press alt + 6

To paste:

  • Press ctrl + U

Reference


Much easier method:
$ cat my_file

Ctrl+Shift+c to copy the required output from the terminal

Ctrl+Shift+v to paste it wherever you like