How to Check Weather in “Command Line Interface”

Sabina Akter
2 min readAug 6, 2022

--

Do you know how to check the weather in cli?

Let’s meet your best friend “CLI” 📋

Let’s get the weather from your “Command Line Interface”

Prerequisite:

The 🆒 thing is no pre-requisite, you just need a desktop computer/laptop that has a Command Prompt.

You don’t need to install anything 😄. But

🔘Before using wttr.in, make sure cURL is installed. In Debian, Ubuntu, or Linux Mint (and other Debian or Ubuntu-based Linux distributions), install cURL using this command:

sudo apt install curl

Step1:

Please open the cli and type:

curl wttr.in

❓ What this command does?

It will auto-detect your location via IP address and then displays the weather.

📓wttr.in — the right way to check curl the weather! 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.

Step2:

Now, on the Command Prompt type the location you need to know the weather. Let’s see an example if we want to know the weather in Manhattan

curl wttr.in/Manhattan

❓What this command does?

This command will display the weather in Manhattan. 🆒

Congratulations 👏 👏 👏. You have checked the weather.

I hope you like it 😄, super cool, super mini project. If you want to know more about it, please click here.

Thanks for reading.

Happy Learning!!

--

--

Sabina Akter
Sabina Akter

Written by Sabina Akter

Infrastructure Engineer/Cloud Engineer at Fox

Responses (1)