How to View Song Lyrics in the Linux Terminal

Listening to music relieves us of stress and makes us more productive at the task at hand. Occasionally, you might want to sing along with the euphonious melody of your favorite song but may end up struggling to identify the correct verse instead.

Luckily, you don’t need to leave the comfort of your /home and fire up a web browser to search for lyrics online. lyrics-in-terminal is a command-line app that displays song lyrics within the Linux terminal.

4

Installing lyrics-in-terminal on Linux

lyrics-in-terminal serves two different use cases. First, you can use it to identify lyrics for the currently playing track, and second, you can view the lyrics of a song stuck in your head by simply specifying its name to the command.

But before all that, you’ll have to install lyrics-in-terminal. Since it’s essentially a Python package, you need to have Python and PIP installed on your system. MostUbuntu-based Linux distributionswill have Python installed, but in case yours doesn’t, follow our guide toinstall Python on Ubuntu.

a lady listening to music with headphones on

Then, install thepython3-pippackage before using PIP to install lyrics-in-terminal. To do this on Ubuntu- and Debian-based distributions, type:

On Arch Linux and its derivatives:

bohemian rhapsody lyrics in terminal

To install python3-pip on Fedora, CentOS, RHEL, and Rocky Linux, type:

After installing PIP, run the following command to install lyrics-in-terminal:

lyrics-in-terminal-working-with-spotify-web-1

If you’re running an Arch-based distribution with AUR support, consider installing the package directly fromthe Arch User Repositoryusing yay:

You can invoke lyrics-in-terminal by typinglyricsin the terminal.

lyrics in terminal help page

Remember to log out and back in again after installing the package, otherwise, the command won’t work.

How to View Song Lyrics on Linux

With the script in place, you can view the lyrics to a particular song using the-tflag. Note that you can get your desired results using just the song name, but if you want the results to be more accurate, it’s recommended that you specify both the song and artist name.

For example, to view the lyrics to the song Bohemian Rhapsody by Queen, enter:

But that’s not the best part. Invoking lyrics-in-terminal without any arguments will scan for the currently playing song on your system and display its lyrics accordingly.

Display Lyrics for the Currently Playing Song

By default, if you simply typelyricsin the terminal and pressEnter, it’ll start scanning for any active Spotify session, both the desktop client and web version. If found, lyrics-in-terminal will extract the song name from Spotify and display its lyrics.

That’s not it. You can also specify the name of the media player (other than Spotify) as an argument to thelyricscommand. Supported players are VLC Media Player, Audacious, Rhythmbox, and mpd.

In the lyrics view, you may pressHto view the various keybindings that work with the interface. Some obvious ones areUpandDownto navigate through the lyrics line by line andLeftandRightto move to the next page.

You can also align the text to the left, right, and center using theJ,K, andLkeys. There’s also the option to switch between lyrics sources:Rfor Google andrfor azlyrics.

If you come across any errors in the lyrics, you can edit the locally saved copy by pressingE. To update or delete the lyrics in the local cache, hitUorD, respectively.

Now You Can Sing Along With Your Favourite Track

lyrics-in-terminal isn’t just a simple tool that displays the lyrics to a song, it’s your entry pass to enjoying music in the way it was actually meant to be, by singing along.

Chances are you might not be impressed with the command-line interface of lyrics-in-terminal and would rather stick with the classic way of browsing lyrics websites. Even then, you’ll be spoilt for choice considering the sheer number of lyrics websites available on the internet.

Heard an unidentified song on the radio or somewhere? These lyrics websites can help you find the songs you’ve been searching for.

Love fades, even for the best open-source darling.

You’re conveying the wrong meaning when you send these emojis.

Windows is great, but adding this makes it unstoppable.

Tor spoiled me forever.

My foolproof plan is to use Windows 10 until 2030, with the latest security updates.

Technology Explained

PC & Mobile