3 Fun Linux Tools to Run on Windows 10 with WSL

Microsoft

We have shown you how to install Linux terminal in Windows 10 with Windows subsystem for Linux. But now that you’ve got this command line interface (CLI), what are you going to do with it? Here are some fun ideas out of the ordinary.

There are lots of fun things you can do with a Linux-based command line for those who love a little Jackie. Here are three starter projects to incorporate the command line into your daily routine. We’ve rated these projects from easy to difficult in terms of difficulty, but all of these projects are still fairly easy for beginners. This is a great way to see what the command line can do. (And yes, it works in WSL on Windows 11 too!)

This tutorial assumes that you are using Ubuntu as your Linux distribution in WSL. If you are using something else, you may need to adapt these commands to your needs. Or, you can install Ubuntu as another Linux terminal and follow along.

Before we begin.

One of the most important things to do when using a terminal is to keep your installed apps and utilities up to date. It requires two simple commands. The first is:

sudo apt update

Let’s break it down. Using sudo Temporarily extends your user account to admin privileges for this single command. Without this height, the command will fail. For use sudo, The terminal will ask you to enter the password you created when you first set up WSL.

Next part apt (Advanced Package Tool,) is a package manager used to install Ubuntu programs and utilities. A package is all the files that work together as a Linux program or utility. The APT is smart enough to not only install the programs you want, but also require any dependencies. Dependence is another program that needs to work for the program you want.

Finally, we have. update, Which is an option for APT that asks it to update package lists. Storage that your system uses. This is the first step in updating to the latest version of the programs installed in the system. Without updating the list, your system will not have enough information to perform the next step.

Our second command is:

sudo apt upgrade -y

We have already covered. sudo And apt, But the new bits tell the system to upgrade our package using the list we downloaded in the previous step. Of -y It’s called a “flag” and in that case it means “yes”. This is an optional command that allows us to skip the annoying part where the system tells us how much storage space the new updates are going to take, and then asks if we want to continue.

Now that our system is modern, we are ready to play with some tools on the command line.

Get the weather.

A terminal window with weather report with ASCII art.
Wttr.in provides weather to your terminal.

The easiest thing to do is to take a picture of the current weather with a three-day forecast. wttr.in. This website reads your IP address so you can be guessed and then the weather will take you to a terminal-friendly format.

If you want to see what it will look like, you can also visit the website in a regular browser.

To get the weather, you need a terminal program. curl, Which should be installed on your system by default. If not, run. sudo apt install curl To achieve this.

Now let’s see the weather in our terminal. curl wttr.in. In a few seconds, you should be able to predict the weather for your location as you can see in the picture above.

Another simple trick is to set up your system so that it shows the latest weather forecast every time you open the terminal. You can do this by adding a command. curl wttr.in Above you .bashrc File.

To understand how to edit. .bashrc File, check out our previous tutorial on how to customize (and color) your Bosch prompt.

Get MLB scores in the terminal.

A terminal window showing the baseball box score table.
You can use MLB-StatsAPI to get baseball game updates in the terminal.

I keep my terminal open all the time, and sometimes I don’t want to bother with Google for details about the latest Yankees game. Instead, I turn to a reliable Python script to get all the information I need.

If you’ve installed the latest version of Ubuntu for WSL, you’ve already got Python 3, which we need for that. You can double check it by typing. python3 --version, Which will tell you the version of Python 3 in your system.

Now, let’s move on to business. The first thing you will need is a set of helpful scripts that we want to capture all baseball data. It is called statsapi, a community based Python background application that we will install using PIP3. Like APT, PIP3 is a package manager, but only for programs written in Python.

First we need to install it. sudo apt install python3-pip -y. Once this is done, follow the command below:

pip3 install MLB-StatsAPI

Now, we can capture our baseball script that depends on. statsapi. The script is coming from my own GutHub repository (there is only one repository for storing code) where I have a bunch of scripts that can get information about the current baseball season.

First, let’s create a new directory (or folder) called “bin”. mkdir bin. Of mkdir The command literally means “create directory.” Then, replace it with this directory. cd bin (“CD” means to change the directory). “Bin” is a common name for folders that contain scripts and executables (binaries) in a Linux environment, but you can name any directory you wish.

Now, we will download the script with “Widget”, a command line downloading tool.

The order is:

https://raw.githubusercontent.com/ianpaul/Baseball_Scores/master/ballgame.py

It downloads a script called ballgame.py from the repository. The extension “py” indicates that this is a Python script.

Now, all we have to do is run our Python script using the Python command.

python3 ~/bin/ballgame.py

This tells the terminal to use Python 3 to interpret the script. Of ~/ Look in the home folder, and then look bin Open the home folder and script ballgame.py.

Once you’ve done that, the script will ask for the name of the team you’re interested in, and then ask if you want to see box scores or line scores. Once you have made the selection a few seconds later, you will find your game information in a terminal friendly format.

Keep in mind that this script is designed to give you the results of the last complete game. It will not update you on the current game.

Twitter on the command line.

A terminal window containing a series of tweets using multiple colors of text.
Rainbow Stream is a Python based terminal app that delivers tweets on the command line.

There are several Twitter clients that can take your Twitter feed to the command line. The good thing about this approach is that it reduces Twitter to its purest form, and it makes the experience a little calmer.

A great CLI Twitter client is Rainbow Stream, which is based on Python and requires some of the tools we’ve already used in previous steps. First, we need to make sure we have all the dependencies that Rainbow Stream needs. This is the command:

sudo apt install python3-dev libjpeg libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev

We will not say what all these tools are. If you want to know, you can search them on Google. After “installing” in the above command, each utility is separated from one place.

Now, let’s install Rainbow Stream. We are using the quick method, but check if you want to use the suggested method. Rainbow Stream documents.

sudo pip3 install rainbowstream

Rainbow Stream will take a few minutes to install automatically.

Now make sure you’re signed in to Twitter in your web browser. Then type to activate the program. rainbowstream In the command line.

Next, Rainbow Stream will want to open a web browser tab to allow the app to access your Twitter account. In some cases, this should happen automatically. If not, just copy and paste the following URL into your web browser. The URL usually looks something like this: https://api.twitter.com/oauth/authorize?oauth_token=XXXXXXXXXXXXXX

Highlight this URL, right-click to copy, and then paste it into your web browser. Twitter will ask you to allow Rainbow Stream to allow the app to access your account, and then Twitter will provide a seven-digit PIN. Type this PIN into the terminal where Rainbow is waiting for the stream code, and that’s it. Your tweets will now hit the command line in a few minutes – the initial run usually takes some time before the tweets enter.

Rainbow Stream is very easy to use, but requires a few commands. Type “here is my tweet” and press enter on your keyboard to publish a tweet.

Each tweet in your stream has an ID number such as “id: 8”. Typing rt 8 We will retweet this tweet. Typing quote 8 Allows you to quote the same tweet and add your own commentary. There is a bunch of other commands that you can read about in the Rainbow Stream documentation.

Like many other command line programs, you can type. h To get help in the app at any time.

If you find that Unicode characters are not displaying correctly, an easy solution is to install Windows Terminal from the Windows Store.

Related: It’s amazing why the new Windows terminal is ready.

Using the command line requires a bit more work than installing a regular program, but it can also be a very powerful, useful and fun tool at your disposal.

Leave a Reply

Your email address will not be published.