Copy text from nano editor to shell [closed]
Is it possible to copy text from a file, opened with nano
, to the shell?
I have a text file, and I want to copy several lines to the console, but I cannot find a keyboard shortcut to copy the text.
Solution 1:
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.
Solution 2:
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