I was wondering if there are shortcuts for selecting some text in terminal, just similar to holding shift and type arrow key in editing a text file in a text editor. Thanks!
I'm assuming you are referring to Gnome Terminal.
No - there isnt a Copy and Paste mechanism using just the keyboard - you can use various short-cuts to paste (depending upon your Ubuntu version) i.e. CTRL+ Shift + Ins , Shift + Ins or CTRL+ Shift + V to paste text in the clipboard.
However, if you type
screen you enter the terminal emulator which allows you to select, copy and paste text using just the keyboard.
To select (copy):
Press Ctrl + A together followed by Escape. This puts you into Copy mode. Using the cursor keys move to the beginning of the text you want to copy. Press Enter. Now move to the end of the text to be copied. Press Enter.
Press Ctrl + A together followed by ].
gnome-terminal running bash as default shell, you can hit
c-x twice (
c- same as
ctrl-) to select the last typed text.
Refer to bash reference for more.