Radio is the oldest form of electronic mass communication, and even in the third decade of the 21st century there are still more people consuming news, finding new music, and passing time while stuck in traffic on the commute to work.
The Internet allows you to listen to radio stations streamed all over the world, exposing you to music, culture, news, and events that you would never have otherwise found. You can listen to internet radio without leaving your Linux machine. Here’s how.
What is internet radio?
Until the early 20th century, entertainment was limited to live venues. You can go to the theater or the dance floor to listen to live music, or you can sing around the piano in the pub. Occasionally musicians would visit.
To get the news, you read the newspaper, and depending on where you are in the world, it could take weeks or months for that news to reach you. Life was bleak, people unaware, and music limited.
Radio changed everything. There was no need to wait for passing travelers to be told what was going on in faraway lands. News, music, and shows were broadcast over the airwaves to entire nations, and smaller stations served individual cities. With the right equipment, at the right time of day, you can listen to radio stations from all over the oceans.
With the advent of the internet came streaming radio – you no longer need to rig arrays of magnetic loop antennas to listen to BBC Radio 4 nightly from the continental US. All you need is a browser or streaming client, and a good internet connection to listen to the local news and music scene from anywhere in the world.
Usually, to listen to internet radio, you visit any number of websites that offer to hook you up to the live broadcast. If you live in an area with data protection laws, you will see pop-ups asking for your consent to track you, display ads, and sell your data. If you don’t… it happens anyway.
Music apps like Spotify have the same problem, and they also trap you in a walled garden — exposing you to music that the algorithm determines works best for you, rather than true exposure to the wider world.
Why listen to internet radio from the station?
While there are dozens of standalone internet radio clients for the Linux desktop, using one application means another that you have to install and manage. It’s memory you can’t afford to waste, and it tends to require you to use your mouse, too.
PyRadio is a full-featured internet radio client that you can play directly from your terminal. It’s entirely keyboard-driven, has low storage and memory footprint, and comes with a good looking Terminal User Interface (TUI).
How to install PyRadio on Linux
The easiest way to install PyRadio is to use your package manager, however, the application is not available in all standard repositories. Although, as the name suggests, it’s a Python implementation, the version of PyRadio available directly via PIP hasn’t been updated since 2013.
If you can’t get the PyRadio app through your package manager, you’ll need to use an installation script made by the developer. First, you will need to install Python. Once Python is on your system, use it to install more dependencies:
python3 -m pip install
Use wget to download the installation script:
…and install it using Python:
If all goes well, you should see a success message as above.
You can now start PyRadio from any terminal with:
Use PyRadio to listen to radio stations from around the world!
Start PyRadio with no arguments, and you’ll see a TUI with a playlist of stations selected by the developer. There’s something for just about everyone, with genres including hip hop, indie pop, jazz, goth rock, and even Commodore 64 remixes from Slay FM.
Navigation is simple: use the arrow keys to move between stations and press Enters To determine. To turn off, press Void. The title and artist of the current track are displayed at the bottom of the interface.
You can move to the top, bottom, or center of the playlist using hAnd theor M—which is easy to remember if you think “high, low, medium.”
PyRadio has five built-in themes, and you can access them by pressing “Ron the keyboard. For a more complete list of key bindings, press “?“.
It’s great to be able to listen to the developer’s premade station playlist, but you may not agree with his choices, or you may have already decided what stations you want to listen to.
PyRadio loads its playlist from a CSV (comma separated values) file located at ~/.config/pyradio/station.csv.
To add, remove, or edit default stations, use nano to open the playlists file:
You will see that each line contains two parts. The first is the name of the station, and the second part after the comma is the URL of the stream. You can delete any lines you don’t want, add new ones, rename the station to something more memorable, or edit the stream’s URL if it changes.
You should not say that the names assigned to your stations should not contain any commas.
Save and exit nano with Ctrl + O and then Ctrl + X.
If you listen to stations from around the world, it can be useful to create multiple playlists. These can be specific to the country of origin, genre of music, time zone, or news stations. It’s up to you.
Create new stations using nano to create and edit new CSV files in ~/ .config/pyradio/ Guide. Remember to label your playlists with a “.csvextension.
To start PyRadio with a specific playlist, use the -s Switch with the name of your playlist. for example:
pyradio -s ~/.config/pyradio/'Russian Numbers Stations.csv'
While you can place your playlist anywhere, if you load it this way, PyRadio will warn you that it is a foreign playlist, and prompt you to copy it into the configuration directory.
To load a playlist from within PyRadio, press “a“.
Internet radio is the best radio
Listening to internet radio in your device is the best way to experience the medium. You don’t need to fiddle with the disc or wait for it to heat up piping hot, and it’s easy to search for and sort stations to create your very own playlist. There’s also something indescribably cool that comes from running bloat-free apps instead of outdated GUIs or browsers.
The only way you can make PyRadio more awesome is by listening to its output through a set of great headphones.