Terminal URL Scheme Support

Terminal URL Scheme Support

3月 21, 2024 · 1 分钟阅读时长 · 116 字 · -阅读 -评论

Both macOS and Windows ship with terminal apps. If they support URL schemes, you can start an SSH session from a hyperlink. Here’s what works today.

URL Schemes

macOS

ssh://<username>@<host>:<port>

Click to test

By default this opens Terminal, but you can remap it to iTerm2 or another terminal app via settings.

Windows

No built-in support. You can configure PuTTY or other tools to handle ssh:// (e.g., https://gist.github.com/sbiffi/11256316).

Windows does have other built-in schemes, such as launching the Store to a product page: test link. Also note that Windows 11 ships with Windows Terminal preinstalled; older versions require manual installation.

Final Thoughts

It’d be great if Windows added native terminal URL handling—macOS has a clear edge here.

Alan H
Authors
开发者,数码产品爱好者,喜欢折腾,喜欢分享,喜欢开源