如果我使用串行端口控制台登录 linux,它使用的是 terminfo 还是 termcap?

If I login linux using serial port console, does it using the terminfo or termcap?

linux控制台由linux内核的VT子系统实现,当我从串口控制台登录时,它使用的是terminfo还是termcap?

没有区别。一些系统可能会为某些应用程序使用 termcap library(副手,可能只有 Slackware),但应用程序使用相同的库,无论它是否在串行端口上运行。

一些应用程序使用 termcap 接口 到 ncurses 库(它同时提供 termcap 和 terminfo 接口),但这并没有改变答案。他们仍将使用相同的库(和相同的接口),因为在同一个库的不同低级接口之间切换没有什么意义。

"interface" 当然是指用于初始化和查询终端数据库的少数函数。使用 termcap 接口 到 ncurses 的应用程序仍然会获得 terminfo 数据,尽管稍微调整以更好地与 screen 等应用程序一起使用,这些应用程序假设备用字符集是 not 由 termcap md 重置("same" 为 sgr0)。

进一步阅读: