Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows » Check Weather Conditions via Command Line on Windows, macOS, Linux and Web
  • Azure Backup 1
    How to Install Azure Backup Agent AWS/Azure/OpenShift
  • PXE E18 Server response timeout
    Stuck at Start PXE over IPv4: PXE-E18 Server response timeout Windows
  • extend proxmox local container instance
    How to extend Proxmox Local Container Storage Virtualization
  • powershell
    How to install and uninstall PowerShell on macOS via Homebrew Mac
  • VMware Type 1 Hypervisor installation
    How to install ESXi on a Beelink EQ12 Mini PC Virtualization
  • screenshot 2020 03 13 at 20.24.17
    How to view installed packages in Cygwin Windows
  • Windows10 SCCM 20161
    What is ADK, MDT, Microsoft Endpoint Configuration Manager (SCCM), Intune, Autopilot, and WSUS Windows Server
  • jhgfx
    How to make Cortana use your default web browser such as Google Chrome Windows

Check Weather Conditions via Command Line on Windows, macOS, Linux and Web

Posted on 13/04/202212/10/2024 Christian By Christian 2 Comments on Check Weather Conditions via Command Line on Windows, macOS, Linux and Web
Weather forecasting

In this guide, you will learn how to check Weather Conditions via Command Line on Windows, macOS, Linux and Web. This will be done by viewing the weather details from the command line (terminal) using wttr.in utility and curl commands. Please see “Open the location of a Program: How to search in Windows 10 to find a file, folder, or program in File Explorer“. Here is How to determine Active Directory Site Name.

The wttr.in is a console-oriented weather forecast service that supports various information representation methods like terminal-oriented ANSI-sequences for console HTTP clients (curl, httpie, or wget), HTML for web browsers, or PNG for graphical viewers. You can use this utility to display the weather details of any given location.

Since wttr.in is a web-based utility, we don’t need to install it or any other additional utilities. To get the weather, you will have to use the wttr.in and curl either from the command line or from a web browser in no time.

Please see: Git Vulnerability: Git for Windows uninstaller is vulnerable to DLL hijacking when run under the SYSTEM user account. Also, see “Enable or Disable Location Services: How to allow apps and services to determine your location on Mac“.

What Ca you do with the wttr.in utility

Curl is a versatile tool that allows you to send and receive data over the network. With wttr.in utility. You can display weather details for the following locations.

Current location,
Particular location,
Geographical location,
Domain name or IP address,
Zip code,
Airport code,
Moon phase and
Also determin the unit of measurement n some countries etc.

wttr.in currently supports five output formats:

  • ANSI for the terminal;
  • Plain-text for the terminal and scripts;
  • HTML for the browser;
  • PNG for the graphical viewers;
  • JSON for scripts and APIs;
  • Prometheus metrics for scripts and APIs.

Here is Change the default Save and Download Location in Windows, and How to Install and Uninstall Yarn on Ubuntu Linux.

Determine Weather Condition from Command Prompt

With curl you can transfer data from or to a server. Therefore, you can access the service from a CLI as shown below.

curl wttr.in
Command-line weather,

Get the latest weather update using Weather from the Terminal! Here’s the Hamburg, Germany forecast. Enter the command to view your current location’s weather via your IP address.

Terminal weather information

Determine Weather Condition from Mac iTerm

On a Mac device, you can still use the same CURL command as this is pre-installed. macOS is a UNIX 03-compliant operating system certified by The Open Group. It has been since 2007, starting with MAC OS X 10.5.

Weather data retrieval

Get Weather Report via PowerShell

Windows, Linux, or Mac, you can use PowerShell to get the Weather details. Starting with Windows 10, version 1803 or later, CURL is installed by default. Kindly run the same command above or the following command below.

PS /Users/christian> Invoke-RestMethod https://wttr.in
Weather forecasting

Linux

If you get an error message saying curl command not found when trying to run the weather command, this is because the curl package is not pre-installed on your Ubuntu at the time of writing this piece. You can install it as shown below. This depends upon the Linux distribution you!

Install Curl

Curl is a command-line utility for transferring data from or to a remote server. With curl, you can download or upload data using one of the supported protocols, including HTTP, HTTPS, SCP, SFTP, and FTP. Curl is included in the default Ubuntu 20.04 repositories. The installation is pretty straightforward.

sudo apt update
sudo apt install curl

Display weather details of the current location

Run the following command curl wttr.in to get the weather condition in Linux as well.

Check for a specific location

In order to get the weather information for a specific location, you can add the desired location to the URL in your request like this.

$ curl wttr.in/Lagos
$ curl wttr.in/Tokyo
Screenshot-2022-04-13-at-19.09.26
Screenshot-2022-04-13-at-19.08.15

Note: You can also set up hotkey ctrl + w for example in your terminal by editing your shell config file or the .zshrc file and adding the bind-key option.

Get Airport Weather Report

You will get a Specific Weather report of an Airport, Use the 3-letter airport codes in order to get the weather information at a certain airport.

$ curl wttr.in/los # Weather for IATA: los, Murtala Muhammed International Airport, Nigeria
$ curl wttr.in/ham # Weather for IATA: ham, Hamburg Airport, Germany
Screenshot-2022-04-13-at-22.18.23

Get Weather information for a specific Geographical Location

Let’s say you’d like to get the weather for a geographical location other than a town or city – let’s say an attraction in a city, a mountain name, or some special location.

Add the character ~ before the name to look up that special location name before the weather is then retrieved.

$ curl wttr.in/~~Louvre+museum
$ curl wttr.in/~Eiffel+Tower
Screenshot-2022-04-13-at-22.25.00

Web Browser (Chrome etc)

From the browser, just enter the following URL in the browser: https://wttr.in/

Screenshot-2022-04-13-at-21.26.23

Display the phase of the moon

Use any of the following commands to display the phase of the moon. For weather units, Map-view, etc, kindly head to the following URL for more details.

Screenshot-2022-04-13-at-22.45.21

I hope you found this blog post on how to Check Weather Conditions via Command Line on Windows, macOS, Linux and Web helpful. If you have any questions, please let me know in the comment session.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Linux, Mac, Windows Tags:PowerShell, Terminal, Web-browser, Windows 10, Windows 11

Post navigation

Previous Post: Git Vulnerability: Git for Windows uninstaller is vulnerable to DLL hijacking when run under the SYSTEM user account
Next Post: What are the effect of renaming an MBAM-Protected Computer

Related Posts

  • chocolatey
    Windows Package Manager: How to install, upgrade or uninstall Chocolatey Windows
  • redisf
    How to install Redis on Linux System Linux
  • Delete Expired Profiles on Mac
    Remove Expired Configuration Profiles on Mac Mac
  • image 79
    How to import SSL Certificate to Windows Server using DigiCert Utility Windows
  • ShieldServersSmall
    How to track your device performance and health via Windows Security in Windows 10 Windows
  • Screenshot 2022 04 27 at 00.50.35
    How to create a BitLocker System Partition [Part 2] Windows

More Related Articles

chocolatey Windows Package Manager: How to install, upgrade or uninstall Chocolatey Windows
redisf How to install Redis on Linux System Linux
Delete Expired Profiles on Mac Remove Expired Configuration Profiles on Mac Mac
image 79 How to import SSL Certificate to Windows Server using DigiCert Utility Windows
ShieldServersSmall How to track your device performance and health via Windows Security in Windows 10 Windows
Screenshot 2022 04 27 at 00.50.35 How to create a BitLocker System Partition [Part 2] Windows

Comments (2) on “Check Weather Conditions via Command Line on Windows, macOS, Linux and Web”

  1. Avatar photo Aaron says:
    31/01/2023 at 3:21 PM

    When looking at the temperature data, what does it mean when one of the numbers is in parenthesis? Thanks!

    Log in to Reply
    1. chris Christian says:
      01/02/2023 at 12:31 PM

      I would represent that as a dot or comma as there is not a standard or widely used term in temperature measurement in parenthesis.

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a
 
  • Azure Backup 1
    How to Install Azure Backup Agent AWS/Azure/OpenShift
  • PXE E18 Server response timeout
    Stuck at Start PXE over IPv4: PXE-E18 Server response timeout Windows
  • extend proxmox local container instance
    How to extend Proxmox Local Container Storage Virtualization
  • powershell
    How to install and uninstall PowerShell on macOS via Homebrew Mac
  • VMware Type 1 Hypervisor installation
    How to install ESXi on a Beelink EQ12 Mini PC Virtualization
  • screenshot 2020 03 13 at 20.24.17
    How to view installed packages in Cygwin Windows
  • Windows10 SCCM 20161
    What is ADK, MDT, Microsoft Endpoint Configuration Manager (SCCM), Intune, Autopilot, and WSUS Windows Server
  • jhgfx
    How to make Cortana use your default web browser such as Google Chrome Windows

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,841 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.