shift使用+时我只能在终端上看到有限的行pageup。在 Ubuntu 桌面版中,有一个选项可以使回滚行数不受限制。在 Ubuntu 服务器版中如何做到这一点?请提出建议。
答案1
最好的选择是使用像screen
或 这样的终端多路复用器tmux
,它们更容易配置。
另一种方法是配置帧缓冲控制台,通过编辑/etc/default/grub
并更改GRUB_CMDLINE_LINUX
为包括fbcon=scrollback:<value>[k]
,其中<value>
是要为缓冲区分配的大小(以千字节为单位)。从内核文档:
C. Boot options
The framebuffer console has several, largely unknown, boot options
that can change its behavior.
1. fbcon=font:<name>
Select the initial font to use. The value 'name' can be any of the
compiled-in fonts: VGA8x16, 7x14, 10x18, VGA8x8, MINI4x6, RomanLarge,
SUN8x16, SUN12x22, ProFont6x11, Acorn8x8, PEARL8x8.
Note, not all drivers can handle font with widths not divisible by 8,
such as vga16fb.
2. fbcon=scrollback:<value>[k]
The scrollback buffer is memory that is used to preserve display
contents that has already scrolled past your view. This is accessed
by using the Shift-PageUp key combination. The value 'value' is any
integer. It defaults to 32KB. The 'k' suffix is optional, and will
multiply the 'value' by 1024.
如果 32KB 不够,请尝试256k
。或者其他值。我猜是反复试验。
答案2
另一个更复杂的选项是使用 set 构建内核CONFIG_VGACON_SOFT_SCROLLBACK
。