Pyradio - Play your Favorite Radio Station from Linux Terminal

play radio station on your terminal

Pyradio is a free and open source Python-based command line tool that allows you to play your favorite radio station online. We'll take you through the installation of Pyradio and how to play your favorite radio station online from Ubuntu Linux terminal. We have tested this installation on Ubuntu 18.04 version.

Prerequisites before installing Pyradio

Before we get started, here are a few things we need to have installed in our Linux system.

  1. Python3
  2. pip3
  3. mplayer or vlc media player

Installation of PyRadio

To install PyRadio clone the git repository

After successful cloning, navigate to pyradio folder

cd pyradio
Use Pyradio to play your favorite radio

Next, we shall install Pyradio by building from source

Building Pyradio from Source

python build

Next, install the build

python install

After successful installation, it's time to launch Pyradio and listen to your favorite radio station!

To launch Pyradio, you need to switch from root to a regular user and  run

pyradio --play


Use Pyradio to play your favorite radio

Scroll to your preferred station and Hit Enter to start streaming.

To view, the station list files head to


In this directory, you'll find the stations.csv file as shown

vim stations.csv


  1 # Find lots more stations at,
  2 Alternative (BAGeL Radio - SomaFM),
  3 Alternative (The Alternative Project),
  4 American Roots (Boot Liquor - SomaFM),
  5 Celtic (ThistleRadio - SomaFM),
  6 Chillout (Groove Salad - SomaFM),
  7 Commodore 64 Remixes (Slay Radio),
  8 Covers (SomaFM),
  9 Downtempo (Secret Agent - SomaFM),
 10 Dub Step (Dub Step Beyond - SomaFM),
 11 Electronic/Dance (Electronic Culture),
 12 Folk (Folk Forward - SomaFM),
 13 Hip Hop (Hot 97 NYC),
 14 Hip Hop (Power 1051 NYC),
 15 House (Beat Blender - SomaFM),
 16 Indie Pop (Indie Pop Rocks! - SomaFM),
 17 Intelligent dance music (Cliq Hop - SomaFM),
 18 Jazz (Sonic Universe - SomaFM),
 19 Lounge (Illinois Street Lounge - SomaFM),
 20 Pop (PopTron! - SomaFM),
 21 Pop/Rock/Urban  (Frequence 3 - Paris) ,
 22 Progressive (Tags Trance Trip - SomaFM),
 23 Public Radio (WNYC - Public Radio from New York to the World),
 24 Reggae Dancehall (Ragga Kings),
 25 Rock (Digitalis - SomaFM),

To access help man pages run

pyradio -h

Sample Output

usage: pyradio [-h] [--stations STATIONS] [--play [PLAY]] [--add] [--list]

Console radio player

optional arguments:
  -h, --help            show this help message and exit
  --stations STATIONS, -s STATIONS
                        Path on stations csv file.
  --play [PLAY], -p [PLAY]
                        Start and play. The value is num station or empty for
  --add, -a             Add station to list.
  --list, -l            List of added stations.

Other Useful controls

Enter - Play the highlighted station
- / +    - Increase / Decrease the volume
    m    - Mute
    r      - Select a random station
    q     -  Quit / End

Read also:

In this article, we outlined how to install and use Pyradio to play your favorite radio station. Pyradio is a handy command-line tool you can use to keep boredom at a bay and inject some excitement by listening to a myriad of worldwide radio stations. It can be installed on many Linux distributions, both Debian and RedHat based. You could also try another version of Pyradio on github but we didn't test it. Give it a shot and give us your feedback. :-)

Resource Reference

GitHub - Pyradio

2 Comments... add one

    • We have tested the first link. I have corrected bottom link, sorry for the confusion. It worth trying the second link as well. Let us know how it goes :-)


Leave a Comment