In the following article, we will show you how to copy from Cutbuffer and Gnome Clipboard to Nano editor. The commands have been tested on Ubuntu 20.04 LTS Terminal.
Copy from Cutbuffer to Nano
To mark (select) the text in Nano editor, place the cursor at the beginning of the text and use the following shortcut.
Then use the arrow keys to mark the text forward or backward. To unmark the text, use the same shortcuts again.
To cut the marked text in Nano editor and save it to Cutbuffer, use the following shortcut:
If you need to cut the entire line of text starting from the current cursor position, just press Ctrl+K without marking the text.
To copy the marked text in Nano editor and save it to Cutbuffer, use the following shortcut:
To copy the saved text from Cutbuffer to Nano, place the cursor at the required position, and use the following shortcut:
It will paste the copied text to the nano editor.
Note: The text copied to Cutbuffer can only be pasted inside the Nano editor’s current session. Also, note that, when we close the Nano editor, the cut buffer is emptied.
Copy from Clipboard to Nano
When you copy a text anywhere inside your desktop using the mouse right-click menu or using the Ctrl+Shift+c, this text is not saved to Cutbuffer. Instead, it saved to Gnome clipboard.
To paste the copied text from Gnome clipboard to Nano editor, use the following shortcut:
Use the mouse right-click menu to paste this text in Nano editor.
Note: The text copied to Gnome clipboard can be pasted to any program or window including the Nano editor.