Прокрутка в консоли linux

How to scroll in the Terminal app «top»?

I’ve read the info page, but I can’t find any way to scroll the list in top . Maybe there is no way to scroll. but there must, at least, be some way to filter the list, and I can’t find that either. How do I display line-entries which are off the page?

4 Answers 4

I have only one suggestion: use htop instead.

Maybe it’s called top for that very reason.. it may be by design that it only shows the top entries. (just guessing, but if it looks like a duck and quacks like a duck, it probably is a duck 😉 . It is very cabable at sorting by columns and add/remove collumns via a single key

There are some filters possible in top BTW, like filtering on user, process ID, &c., but htop has so many more possibilities, plus a UI that’s easy to change from inside the program.

The point of the «TOP» program is to tell you which processes are using the most resources or are at the TOP of the list.

For a full process list use «ps»:

You can filter it with «grep»:

Indeed, the up and down arrow keys will scroll through top on newer versions, specifically at least on the version of top that comes with Ubuntu 16.04.2 ( procps-ng version 3.3.10).

But if the arrow keys don’t work to scroll for you, it could just be an issue with your terminal emulator.

Take a look at the top man page:

Lastly, some of top’s screens or functions require the use of cursor motion keys like the standard arrow keys plus the Home, End, PgUp and PgDn keys. If your terminal or emulator does not provide those keys, the following combinations are accepted as alternatives:

 key equivalent-key-combinations Up alt + \ or alt + k Down alt + / or alt + j Left alt + < or alt + h Right alt + >or alt + l (lower case L) PgUp alt + Up or alt + ctrl + k PgDn alt + Down or alt + ctrl + j Home alt + Left or alt + ctrl + h End alt + Right or alt + ctrl + l 

So if the up and down arrow keys don’t work for you (make sure you hold them down, as deto said), try pressing alt + \ , alt + / , alt + k and alt + j .

Note that this section of the man page does not exist on my RHEL 6.6 machine, which has procps-ng version 3.2.8 (you can see the version number with top -v ), and so that version of top does not appear have any scrolling capability.

Источник

Как вы прокручиваете вверх/вниз на консоли Linux?

Я понимаю, что Up / Down даст вам историю команд. Но как вы смотрите на прошлые результаты, прокручивая вверх и вниз?

Я использовал Shift + Page Up / Page Down , Alt + Shift + Up / Down и Page Up / Page Down , но, похоже, ничего из этого не работает.

SHIFT + Page Up и SHIFT + Page Down . Если это не сработает, попробуйте это, а затем оно должно:

Зайдите в программу терминала и убедитесь, что
Edit/Profile Preferences/Scrolling/Scrollback/Unlimited
проверяется.

Читайте также:  Linux terminal удалить папку

Точное местоположение этой опции может быть где-то другим, но я вижу, что вы используете Redhat.

Shift + Fn + UP или DOWN на Macbook позволит вам прокручивать.

Альтернатива: вы можете использовать команду less .

Это позволит вам прокручивать клавиши со стрелками вверх и вниз.

В основном ваш вывод был передан с помощью команды less .

SHIFT + Page Up и SHIFT + Page Down являются правильными ключами для работы на виртуальной консоли, но консоль vmware не имеет этих настроек терминала. Виртуальная консоль имеет фиксированный размер прокрутки назад, похоже, что она ограничена размером видеопамяти в соответствии с этой виртуальной консолью Linux Документация по прокрутке.

АЛЬТЕРНАТИВА ДЛЯ ОБРАБОТКИ ЛИНИИ-ЛИНИИ

Ctrl + Shift + Up Arrow или Down Arrow

В отличие от Shift + Page Up или Page Down , который прокручивает всю страницу, это поможет с плавной линейной прокруткой, что именно то, что я искал.

Еще одна альтернатива, которая может быть уже установлена ​​в вашей системе, – использовать экран GNU:

# This starts screen which adds basic window management in terminals screen # This starts the copy mode you can use to scroll [ # Now use the arrows to scroll # To exit copy mode, do

Посмотрите man-экран для более полезных параметров (несколько окон,…)…

VM Ubuntu на Mac… fn + shift + стрелки вверх/вниз

Кажется, что это не легко возможно: Arch Linux Wiki не перечисляет способов сделать это на консоли (хотя это легко возможно на виртуальном терминале).

Ctrl – b , затем [ , затем вы можете использовать обычные навигационные клавиши для прокрутки (например, Up Arrow или PgDn ). Нажмите q , чтобы выйти из режима прокрутки.

В качестве альтернативы вы можете нажать Ctrl – b PgUp , чтобы перейти непосредственно в режим копирования и прокрутить одну страницу вверх (как это звучит, как вы хотите, большую часть времени)

Fn + Вверх/вниз можно прокручивать терминал в Mac OS X 10.11

Я столкнулся с той же проблемой с рабочей станцией VMWare с гостевой консолью Ubuntu, оказалось, что VmWare не поддерживает прокрутку резервной копии с сервера. Я сделал, чтобы установить x GUI, а затем запустить xterm оттуда. По какой-то причине он работает одинаково, но позволяет прокручивать обычные пути. Надеюсь, это поможет будущим читателям в виртуальных коробках VmWare.

ПРОСТОЙ, окончательное решение

Добавьте эту строку в ваш ~/.screenrc

Теперь вы можете создать экран и прокручивать его вверх/вниз с помощью мыши; Как обычно.

Нажмите клавишу Shift , когда прокрутка мыши вверх/вниз работает для меня при входе в Ubuntu с помощью терминала ssh в Yosemite.

Для некоторых команд, таких как mtr + (plus) и – (минус), прокручивайте вверх и вниз.

На некоторых linode VPS (например, на linode ) вы должны нажать Ctrl+A , а затем ESC . Выход с двойным ESC тоже.

Источник

How to scroll up and down in sliced «screen» terminal

I just installed screen and like the idea to divide linux terminal into multiple pieces. But I can’t figure out one thing: How to scroll up and down, when I’m in screen . When I’m using regular linux terminal I can achieve this with Shift + Pg Up or Shift + Pg Dn `. but unfortunatelly it doesn’t work in divided terminal. That’s what I mean when saying screen and divided terminal: enter image description hereAnd that’s a regular termina (just in case): enter image description here

5 Answers 5

1. Ctrl + A , then Esc
2. After that, you should be able to move your cursor around using the arrow keys:
↑ , ↓ , PgUp , PgDn and sometimes using the mouse wheel
3. Return control: Q or Esc

Читайте также:  Post command in linux

@MihaiDanila: How would you «normally» use the navigation keys? The navigation keys are handled by the current foreground application. If it’s an editor, they’ll probably work. If it’s a shell, they’ll probably go back through your command history without scrolling the display.

If my pageup/pagedown keys work in a normal shell, I’d like for them to work in a shell from screen . I think that’s what I’m asking here.

in this mode selection of any text is available by typing Space or Enter key once and finish your text selection with another Space or Enter. the selection will enter into the screen based clipboard. you could paste clipboard data later using Ctrl+a then ]

Источник

How do you scroll up/down on the console of a Linux VM [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

I recognize that Up / Down will give you the command history. But, how do you look at past output by scrolling up and down? I have used Shift + Page Up / Page Down , Alt + Shift + Up / Down and Page Up / Page Down but none of these seem to work. It is a Redhat Linux box.

Is that a vmware thing? If you’re not using a regular terminal emulator, you won’t have terminal functions like scrollback.

15 Answers 15

SHIFT + Page Up and SHIFT + Page Down . If it doesn’t work try this and then it should:

Go the terminal program, and make sure
Edit/Profile Preferences/Scrolling/Scrollback/Unlimited
is checked.

The exact location of this option might be somewhere different though, I see that you are using Redhat.

Only the first line of this answer is useful on the Linux console, the rest might be useful on a GUI terminal like gnome-terminal, though unlimited is not needed.

Shift + Fn + UP or DOWN on a Macbook will allow you to scroll.

Thanks for this Lauren, and thanks @anizzomc. I was on my macbook pro running Ubuntu server in virtual box and was having a heck of a time trying to figure this out.

As the comments show, this is the only correct answer. Everyone else is talking about terminal emulators, which is not what the OP is asking. It is the only thing which worked for me on Ubuntu Server 14.04 emulation in Parallels on Macbook Pro

that’s simply because your PageUp/PageDown keys are mapped to Fn+Up/Down, it won’t work in other keyboards. And Fn is not a real key that the OS recognizes (except on Macs)

Alternative: you can use the less command.

This will allow you to scroll with the up and down arrow keys.

Basically your output has been piped with the less command.

Interesting enough this was the only way that actually worked when using the shell on a FreeNAS install disk.

FreeNAS is FreeBSD based, and there you scroll differently. First you press scroll lock to get into paging mode and then use plain arrows and page up / page down to scroll. Press scroll lock again to get back to typing mode.

Читайте также:  Дистрибутив линукса для программиста

ALTERNATIVE FOR LINE-BY-LINE SCROLLING

Ctrl + Shift + Up Arrow or Down Arrow

Unlike Shift + Page Up or Page Down , which scrolls the entire page, this will help with a smoother line-by-line scrolling, which is exactly what I was looking for.

SHIFT + Page Up and SHIFT + Page Down are the correct keys to operate on the linux (virtual) console, but vmware console doesn’t have those terminal settings. The virtual console has fixed scroll back size, it sounds like it’s limited to video memory size according to this Linux virtual console Scrolling behavior documentation.

In order to prevent the Matthew Effect, from now on I will try to upvote the second and correct answer to encourage ppl to answer the questions who already have a correct answer.

Another alternative, that might be already installed on your system is to use GNU screen :

# This starts screen which adds basic window management in terminals screen # This starts the copy mode you can use to scroll [ # Now use the arrows to scroll # To exit copy mode, do

See man screen for much more useful options (multiple windows, . ).

Shift Pageup/End works for me.

It seems as though this is not easily possible: The Arch Linux Wiki lists no way to do this on the console (while easily possible on the virtual terminal).

Ctrl — b then [ then you can use your normal navigation keys to scroll around (eg. Up Arrow or PgDn ). Press q to quit scroll mode.

Alternatively you can press Ctrl — b PgUp to go directly into copy mode and scroll one page up (which is what it sounds like you will want most of the time)

Источник

How to scroll in a terminal using keyboard?

How can I scroll in bash using only the keyboard? If it’s not possible in bash, are there any other shells that support this?

This is not a feature of the shell, it’s a feature of the terminal emulator. See What is the exact difference between a ‘terminal’, a ‘shell’, a ‘tty’ and a ‘console’? What terminal are you using?

I think this is too broad. As mentioned, scrolling is a terminal emulator feature, not a shell feature. There are really very many terminal emulators many of which implement scrolling in different ways, or not at all.

On that score: For a question specifically about GNOME Terminal, although the questioner initially also did not specify the terminal emulator program, see unix.stackexchange.com/questions/460422 .

12 Answers 12

In «terminal» (not a graphic emulator like gterm ), Shift + PageUp and Shift + PageDown work.

I use the default terminal in Ubuntu 14 (bash) and to scroll by page it is Shift + PageUp or Shift + PageDown to go up/down a whole page.

Ctrl + Shift + Up or Ctrl + Shift + Down to go up/down by line.

This depends on your terminal emulator, not the shell you are using. I personally use GNU Screen. From the description:

Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells.

You can use C-a [ to enter scrollback mode. From here, you can scroll with the keyboard and even copy and paste. The mode can be exited from by using the Esc key.

Источник

Оцените статью
Adblock
detector