你如何在 Linux 控制台上向上/向下滚动?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15255070/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do you scroll up/down on the Linux console?
提问by Jane Doh
I recognize that Up/Downwill give you the command history. But, how do you look at past output by scrolling up and down?
我知道Up/Down会给你命令历史。但是,您如何通过上下滚动查看过去的输出?
I have used Shift+Page Up/Page Down, Alt+Shift+Up/Downand Page Up/Page Downbut none of these seem to work.
我使用过Shift+ Page Up/ Page Down、Alt+ Shift+ Up/Down和Page Up/Page Down但这些似乎都不起作用。
It is a Redhat Linux box.
它是一个 Redhat Linux 机器。
回答by meyumer
SHIFT+Page Upand SHIFT+Page Down. If it doesn't work try this and then it should:
SHIFT+Page Up和SHIFT+ Page Down。如果它不起作用试试这个,然后它应该:
Go the terminal program, and make sureEdit/Profile Preferences/Scrolling/Scrollback/Unlimited
is checked.
转到终端程序,并确保Edit/Profile Preferences/Scrolling/Scrollback/Unlimited
已选中。
The exact location of this option might be somewhere different though, I see that you are using Redhat.
该选项的确切位置可能有所不同,但我看到您正在使用 Redhat。
回答by BenPen
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.
SHIFT + Page Up
和SHIFT + Page Down
是在 linux(虚拟)控制台上操作的正确键,但 vmware 控制台没有这些终端设置。虚拟控制台具有固定的回滚大小,根据此 Linux 虚拟控制台滚动行为文档,它听起来像是仅限于视频内存大小。
回答by Lauren
Shift+Fn+ UPor DOWNon a Macbook will allow you to scroll.
Shift+ Fn+UP或DOWN在MacBook上,您就可以滚动。
回答by igaurav
Alternative:you can use the less
command.
替代方法:您可以使用该less
命令。
Type in console:
在控制台输入:
"your_command" | less
This will allow you to scroll with the up and down arrow keys.
这将允许您使用向上和向下箭头键滚动。
Basically your output has been piped with the less
command.
基本上,您的输出已通过该less
命令进行管道传输。
回答by mcbluefire
For some commands, such as mtr + (plus) and - (minus) work to scroll up and down.
对于某些命令,例如 mtr +(加号)和 -(减号)可以上下滚动。
回答by ohho
Press the Shiftkey when scrolling the mouse up/down works for me when loggin in Ubuntu using Terminal ssh
in Yosemite.
Shift当使用ssh
优胜美地的终端登录 Ubuntu 时,在向上/向下滚动鼠标时按下该键对我有用。
回答by likid1412
Fn+ Up/Downcan scroll Terminal in Mac OS X 10.11
Fn+Up/Down可以在 Mac OS X 10.11 中滚动终端
回答by serv-inc
It seems as though this is not easily possible: The Arch Linux Wikilists no way to do this on the console (while easily possible on the virtual terminal).
似乎这并不容易:Arch Linux Wiki列出了无法在控制台上执行此操作的方法(而在虚拟终端上很容易实现)。
You could use tmux scrolling:
您可以使用tmux 滚动:
Ctrl-bthen [then you can use your normal navigation keys to scroll around (eg. Up Arrowor PgDn). Press qto quit scroll mode.
Alternatively you can press Ctrl-bPgUpto go directly into copy mode and scroll one page up (which is what it sounds like you will want most of the time)
Ctrl-b然后[你可以使用你的普通导航键来滚动(例如Up Arrow或PgDn)。按q退出滚动模式。
或者,您可以按Ctrl-bPgUp直接进入复制模式并向上滚动一页(这听起来像是您大部分时间都想要的)
回答by csugai
I ran into the same problem with VMWare workstation with Ubuntu guest, turns out VmWare doesn't support scrolling back up from the server view. What I did was to install x GUI, then run xterm from there. For some reason it runs the same, but lets you scroll the normal ways. Hope this helps future readers in VmWare virtual boxes.
我在使用 Ubuntu 来宾的 VMWare 工作站上遇到了同样的问题,结果发现 VmWare 不支持从服务器视图向上滚动。我所做的是安装 x GUI,然后从那里运行 xterm。出于某种原因,它运行相同,但可以让您以正常方式滚动。希望这对 VmWare 虚拟盒子的未来读者有所帮助。
回答by Vicky Singh
ALTERNATIVE FOR LINE-BY-LINE SCROLLING
逐行滚动的替代方法
Ctrl+ Shift+ Up Arrowor Down Arrow
Ctrl+ Shift+Up Arrow或Down Arrow
Unlike Shift+ Page Upor 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或不同Page Down,这将有助于更平滑的逐行滚动,这正是我正在寻找的。