2

I know there is a shortcut to copy and paste contents in a Linux terminal. In addition, you can scroll through the contents of a terminal window by using Shift+PgUp and Shift+PgDown.

But is there any shortcut to select text or highlight text in a terminal without using a mouse? Unfortunately, I could not find an answer to this question; that is why I am asking here.

To clarify, I wanted to know about a keyboard command that will scroll through the terminal contents or output in the terminal. And it does not have to be a Gnome terminal; it should be some universal command for all kinds of the terminal. Like selecting the ID of a docker container after building the image.

lone wolf
  • 158
  • 6
  • 22

2 Answers2

1

Have a look at tmux.

The default shortcut to enter "copy mode" in tmux is Ctrl-b [, from where you use Vim-like shortcuts to select and yank text and to paste you use Ctrl-b ].

Vilinkameni
  • 781
  • 1
  • 4
  • 12
1

Selecting text can be a function of your shell or of the of the terminal emulator you are using. Alacritty is one that supports vi-like text selection with keyboard shortcuts.

Philippos
  • 13,453