DEV Community

Cover image for ๐Ÿš€ "Forget the Weather App โ€“ I Check the Forecast Using My Linux Terminal "
Rajpreet Gill
Rajpreet Gill

Posted on

2

๐Ÿš€ "Forget the Weather App โ€“ I Check the Forecast Using My Linux Terminal "

๐Ÿ”น Introduction:

Every morning, we grab our phones and open a weather app. But ever since I started my 30-day Linux challenge, Iโ€™ve been doing it differently.
๐ŸŒง๏ธโ˜€๏ธ I check the weatherโ€ฆ from the terminal. Yes, the terminal!
Hereโ€™s how you can look like a hacker while checking if you need an umbrella.
๐Ÿ˜Ž

๐Ÿ”น What Youโ€™ll Learn:

๐Ÿ”น Step-by-Step Tutorial (With Code Blocks)

Letโ€™s get into how you can check the weather right from your Linux terminal. No weather apps, no browser โ€” just pure terminal magic. ๐Ÿง™โ€โ™‚๏ธโšก

โœ… Step 1: Open Your Terminal

You can open it by pressing:

Image description

โœ… Step 2: Use curl with wttr.in

This command shows you the weather forecast in your current city using the terminal:

Image description

โœ… Step 3: Check Weather for a Specific City

Want to check the weather in Delhi, UK, or USA? Just add the city name:

Image description

Image description

โœ… Step 4: Customize the Output

Image description

๐ŸŽฏ Metric Units (Celsius)

Image description

๐Ÿงผ No ASCII Graphics (Plain Output)

Image description

โœ… Step 5: Create a Weather Shortcut (Alias)

Want to type weather instead of writing the full command every time?
Add this line to your .bashrc or .zshrc file. In my Case, I'm using .zshrc file.

  1. Edit your .zshrc file with nano ~/.zshrc.
  2. Add the alias to .zshrc with alias weather="curl wttr.in"
  3. Save and exit the editor
  • Press Ctrl + X to exit.
  • Press Y to confirm changes.
  • Press Enter to save the file.

Image description

To write something in the terminal or display text, you can use commands like:

  • echo: For printing messages.
  • cat >: To write multiple lines into a file.
  • nano: For directly editing files in the terminal.
  • tee: For displaying text and saving it to a file simultaneously.

These simple commands let you write, edit, and manage text efficiently from the terminal.

#30DaysLinuxChallenge #CloudWhisler
DevOps #Linux #RHCSA #Opensource #AWS #CloudComputing

Catch out by My LinkedIn profile
https://www.linkedin.com/in/rajpreet-gill-4569b4161/

Redis is #1 most used for AI agent data storage and NoSQL databases. Here\

Redis is #1 most used for AI agent data storage and NoSQL databases. Here's why.

49,000 responses in the Stack Overflow 2025 Developer Survey have spoken: Redis 8 is 2x faster, with Redis Query Engine and vector sets enabling real-time agent memory and semantic caching.

Learn more

Top comments (0)

For IaC Practitioners, By IaC Practitioners

For IaC Practitioners, By IaC Practitioners

Learn how to embed security from day one using policy-as-code, AI-driven scanning, and strong collaboration between engineering and cybersecurity teams at IaCConf on Wednesday August 27, 2025.

Join us on August 27

๐Ÿ‘‹ Kindness is contagious

Explore this practical breakdown on DEVโ€™s open platform, where developers from every background come together to push boundaries. No matter your experience, your viewpoint enriches the conversation.

Dropping a simple โ€œthank youโ€ or question in the comments goes a long way in supporting authorsโ€”your feedback helps ideas evolve.

At DEV, shared discovery drives progress and builds lasting bonds. If this post resonated, a quick nod of appreciation can make all the difference.

Okay