Check Weather Conditions from Linux Terminal

Have you ever thought to get your weather condition from Linux Terminal? I just saw a cool tool that will help us to see the weather conditions without leaving the terminal.

This weather tool can show the weather from localities throughout the USA and some select locations globally by receiving and formatting decoded METAR-s(Meteorological Aerodrome Reports) from the USA National Oceanic and Atmospheric Administration and also from the USA National Weather Service.

In case you want to install this weather utility, open the Terminal and execute the command below:

$ sudo apt-get install weather-util

To see your weather, you need to find your id code of your city at http://weather.noaa.gov/. Firstly choose your state and then choose your city. In my case, I chose London because I live here. The code of London’s airport is EGLC.

$ weather -i EGLC

In the previous command, the option -i serve to specify the id I entered.

After we enter the command above, we see in the Terminal the output. It shows the temperature, relative humidity and wind.


Searching via station…
[caching result London City Airport, United Kingdom]
Current conditions at London City Airport, United Kingdom (EGLC) 51-30N 000-30W
Last updated Dec 02, 2015 – 12:50 PM EST / 2015.12.02 1750 UTC
Temperature: 55 F (13 C)
Relative Humidity: 76%
Wind: from the SSW (210 degrees) at 12 MPH (10 KT)

To see the weather for the following days enter the command below:

$ weather -f KNYC

The KNYC is the code for New York City Central Park.

The output of the command above is:


Searching via station…
[caching result New York City Central Park, NY, United States]
Current conditions at New York City Central Park, NY
Last updated Dec 02, 2015 – 01:04 PM EST / 2015.12.02 1804 UTC
Temperature: 52.0 F (11.1 C)
Relative Humidity: 89%
Wind: Calm
Sky conditions: overcast
Precipitation last hour: A trace
***** Zone Forecast *****
1015 AM EST WED DEC 2 2015
NYZ072-022130-
NEW YORK (MANHATTAN)-
1015 AM EST WED DEC 2 2015
.TODAY…OCCASIONAL SHOWERS. WIDESPREAD FOG. HIGHS IN THE UPPER 50S.
SOUTHEAST WINDS AROUND 5 MPH. CHANCE OF RAIN NEAR 100 PERCENT.
.TONIGHT…MOSTLY CLOUDY. OCCASIONAL SHOWERS…MAINLY IN THE
EVENING. AREAS OF FOG IN THE EVENING. LOWS IN THE MID 40S. SOUTH
WINDS 5 TO 10 MPH…BECOMING WEST AFTER MIDNIGHT. CHANCE OF RAIN
80 PERCENT.
.THURSDAY…MOSTLY SUNNY AND BREEZY. HIGHS IN THE LOWER 50S. WEST
WINDS 15 TO 20 MPH WITH GUSTS UP TO 30 MPH.
.THURSDAY NIGHT…MOSTLY CLEAR. LOWS IN THE UPPER 30S. WEST WINDS
10 TO 15 MPH. GUSTS UP TO 25 MPH IN THE EVENING.
.FRIDAY…SUNNY. HIGHS AROUND 50. NORTHWEST WINDS 5 TO 10 MPH.
.FRIDAY NIGHT…MOSTLY CLEAR. LOWS IN THE UPPER 30S.
.SATURDAY…SUNNY. HIGHS AROUND 50.
.SATURDAY NIGHT…MOSTLY CLEAR. LOWS AROUND 40.
.SUNDAY…SUNNY. HIGHS IN THE MID 50S.
.SUNDAY NIGHT…MOSTLY CLEAR IN THE EVENING…THEN BECOMING PARTLY
CLOUDY. LOWS IN THE LOWER 40S.
.MONDAY…SUNNY. HIGHS IN THE LOWER 50S.
.MONDAY NIGHT…PARTLY CLOUDY IN THE EVENING…THEN BECOMING MOSTLY
CLOUDY. LOWS IN THE UPPER 30S.
.TUESDAY…PARTLY SUNNY WITH A 30 PERCENT CHANCE OF RAIN. HIGHS
AROUND 50.

This tool is great if you want to check the weather in your area without leaving the terminal.