lolcat
V2EX  ›  Linux

ubuntu server 版如何在终端翻页?

By lolcat at 2025 年 11 月 27 日 · 2307 次点击

使用 vmware 装的系统,不带图形桌面,终端连续输出很多内容,想往上翻最早的输出如何查看? 其他的系统按 shift+pageUp ,shfit+pageDown 都能在终端翻页,只在这个系统发现不行。

18 条回复    2025-11-27 20:38:30 +08:00
psllll
   1
psllll  
   2025 年 11 月 27 日
你的命令 | tee output.txt
然后直接看 output.txt 就行
GoodRui
   2
GoodRui  
   2025 年 11 月 27 日
@psllll 这个效率也太低了...所以我一直觉很非常非常不可思议,怎么这种很基础的功能没有个标准的实现?
kapr1k0rn
   3
kapr1k0rn  
   2025 年 11 月 27 日
用 screen/tmux
PolarBears
   4
PolarBears  
   2025 年 11 月 27 日
| less
Tink
   5
Tink  
PRO
   2025 年 11 月 27 日
|more
FabricPath
   6
FabricPath  
   2025 年 11 月 27 日
你看到的是一个”屏幕“,而不是一个“软件实现的窗口“

就和你屏幕刷新了新的内容出来,那之前的数据就丢了
dzdh
   7
dzdh  
   2025 年 11 月 27 日
所以才会有后台运行,记录日志,然后去看日志。tail -f 看日志也不能看之前的吧,虚拟终端有鼠标能滚动,虚拟屏幕貌似也不能往上翻。所以老实记日志。
busier
   8
busier  
   2025 年 11 月 27 日 via iPhone
console 流式输出就是标准实现

这个特性就决定了不能翻页
superrichman
   9
superrichman  
   2025 年 11 月 27 日
用 tmux/byobu 都可以滚动,需要自己学一下快捷键
lolcat
   10
lolcat  
OP
   2025 年 11 月 27 日
楼上把输出重定向到文件中再翻页查看太麻烦了吧,使用习惯问题没人每次执行一遍命令都在后面加管道吧?难道 ubuntu 终端没有翻页的快捷键?
busier
   11
busier  
   2025 年 11 月 27 日 via iPhone
那用 script filename.txt 好了
coldle
   12
coldle  
   2025 年 11 月 27 日
省事点,装个 tmux ,C-b [ 就是干
whenov
   13
whenov  
   2025 年 11 月 27 日
原始的 console 就是没这个功能,上个 tmux 吧
lolcat
   14
lolcat  
OP
   2025 年 11 月 27 日
@busier 但是 centos 系列的终端,就支持 shift+pageUP 翻页
lolcat
   15
lolcat  
OP
   2025 年 11 月 27 日
@whenov 但是 centos 系列的终端,就支持 shift+pageUP 翻页
whenov
   16
whenov  
   2025 年 11 月 27 日
@lolcat 查了一下在 5.9 之后的内核中移除了 scrollback 功能,可能你用的 centos 版本比较老所以支持
JerryYuan
   18
JerryYuan  
   2025 年 11 月 27 日 via Android
跟南大 jyy 学的:
command |vim -
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
© 2026 V2EX · 1279ms · 3.9.8.5