从默认 linux 命令行无限向上滚动

unlimited scrolling up from default linux command line

我希望通过 linux 命令行增加向上滚动缓冲区的默认大小。它是没有 gui 的 Debian 服务器。

我在bashrc中没有找到相关选项,我什至不知道是否有其他配置文件用于默认提示符alt+f1 alt+f2 ...

您可以使用内核选项更改回滚缓冲区大小,如下所述:https://wiki.archlinux.org/index.php/Scrollback_buffer

但是,如果您对命令的输出感兴趣,但同时又想以交互方式查看命令的进度,我建议使用 tee:

command | tee out.file

或者如果你想附加到文件使用

command | tee -a out.file

tee不错!用它! :)