用 wttr.in 在终端查天气

用 curl 快速获取任意城市的当前天气。

Linuxcurl 请求网络API低风险
运行 curl "wttr.in/Beijing?format=3",打印一行天气摘要。

01命令

命令
$ curl "wttr.in/Beijing?format=3"

02作用说明

wttr.in 是免费的天气服务,把预报渲染为纯文本。?format=3 返回紧凑的一行摘要;去掉参数得到完整 ASCII 预报,加 ?0 只看当天。无需 API 密钥。

03风险

风险低风险
使用条件curl (preinstalled on most Linux distributions)
!注意: 这是第三方服务,可用性和限流可能变化,不要在其上构建关键自动化。

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • chubin/wttr.in
    GitHub · vendor-doc · 2026-09-20
    依据: Documents wttr.in one-line format (?format=3), units and location paths.

最后验证: 2026-09-20 · 分类: 网络

06相关方案