Windows 中的 Linux 控制台控制,如 Putty
前几天我在使用 Putty 并意识到它有自己的控制台控件(Linux 控制台而不是 Windows 命令提示符),我想知道他们是如何做到的?有什么建议吗?
I was using Putty the other day and realized that it has it's own console control (a Linux one not the windows command prompt) and I was wondering how they did it? Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
tl;dr:PuTTY 几乎不执行任何“控制台”工作;它只是显示服务器上发生的情况,就像纯文本远程桌面一样。
PuTTY 有许多不同的组件;最重要的是通过 SSH、Telnet 和串行端口等方式实现通信的后端,以及可能是 通过解释一些终端的历史,
最容易理解终端仿真器所做的工作;早在我出生之前,在老电影时代,终端是非常有限的设备——键盘和打印机,能够通过简单的电线发送击键,并在发回简单命令时打印字符(在纸上!)。所有实际的思考都是由电线另一端的房间大小的主机完成的。 以改善全球热核战争的用户体验:
Terminals 后来添加了简单的视频输出, 视频终端大致相同,只是添加了一些额外的命令来制作漂亮的颜色等等。
最终,在我出生的时候,恐龙灭绝了,我们进入了计算机的现代时代,对于像我们这样的普通人来说,拥有一台自己的整台计算机变得可行,但终端机制仍然存在,而且非常有用和可靠,不能扔掉;所以终端模拟器被发明了;同样的简单命令通过线路发送,终端软件会伪造视频终端所显示的相同显示。
如果您想自己编写其中一个,则需要:
如果您尝试一下,这些链接可能会有所帮助:
tl;dr: PuTTY does almost no "console" work; it just shows what it happening on the server, like a text-only remote desktop.
PuTTY has a number of different components; the most significant are the backends which implement communications over such things as SSH, Telnet, and serial ports, and the terminal emulator which is probably the bit you are interested in.
The work done by the terminal emulator is most easily understood by explaining a little about the history of terminals; back before I was born, in days of old movies, terminals were seriously limited devices - a keyboard and printer, capable of sending the keystrokes over a simple wire and printing characters (on paper!) when simple commands were sent back. All the actual thinking was done by the room-sized mainframe at the other end of the wire. Terminals later added simple video output to improve the user experience of global thermonuclear war:
The information going over the wire to the video terminals were much the same, with a few extra commands added to make pretty colours and so on.
Eventually, around the time I was born, the dinosaurs die off and we enter the modern age of computers, and it becomes practical for normal mortals like us to have a whole computer to themselves, but mechanism for terminals was still around and too useful and reliable to throw away; so terminal emulators were invented; the same simple commands are sent up the wire, and terminal software fakes up the same display a video terminal would have shown.
If you wanted to go about writing one of these yourself, you would need:
These links might help if you take the plunge: