How to check weather in Ubuntu terminal

Monitoring weather conditions daily is essential for us. It helps us plan our daily activities. Changes in weather conditions would affect our outdoor activities, clothing choices, etc. The main components of weather are Temperature, Relative Humidity, Wind, and Precipitation.

We usually monitor changes in weather conditions through Television Networks, Newspapers, Websites, etc. Apart from the resources we just mentioned, we can also monitor changes in weather through the Ubuntu terminal.

The package that helps us with that is weather-util.

Note: The following operations require Administrative rights. If you lack the necessary rights to make changes to your system then, contact your System Administrator for assistance.

Check weather in Ubuntu terminal

The package is a part of the standard Ubuntu repository. Therefore, we recommend you update that first. Open a terminal and issue the following command:

sudo apt update

To install weather-util package:

sudo apt install weather-util

Now, there are multiple ways to search weather-related data for our location. For instance, if we are looking for weather information in Luxembourg. Then,

weather -a Luxembourg

This would suffice. where -a option is issued for alert notices.

But, when it comes to finding the same for New York City, we have to:

weather "New York"

This would show us a set of results. Get the associated FIPS code and run the command with it again:

weather -a fips3651000

Apart from that, we can also use Latitude and Longitude data:

weather -a 51.5072n,0.1276w

For weather forecasts, use the -f option:

weather -f fips3651000

Though weather-related forecast feature is not available for all locations.

In conclusion, we have covered how to check weather-related data in the Ubuntu terminal.

Similar Posts