You don't even need a web browser.


First, test it out in the terminal:
- Code: Select all
$ curl -4 http://wttr.in/Paris
You should now get a nice forecast for the next three days in Paris. Try another city by replacing Paris with what you want.
If you like this tool, let's make a script to make it possible for you to get the forecast of your city just by typing wttr in the command line.
As root:
- Code: Select all
# nano /bin/wttr
Paste the following content into the file:
- Code: Select all
#!/bin/bash
CITY=${1:-Kristiansand}
curl -4 http://wttr.in/${CITY}
The second line states the default city. Replace it with the city closest to you.
Save and exit. (In nano this is done by pressing Ctrl + X, and then Y to save.)
You now only need to make the script executable (as root).
- Code: Select all
# chmod +x /bin/wttr
All done!
Now you can check the weather forecast where you live by typing (as regular user)
- Code: Select all
$ wttr
in the terminal.
If you want to check the weather in, say, Istanbul, just type
- Code: Select all
$ wttr istanbul
