Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to read the mp3 tags of a file from the shell? Something like: mp3tags MyFile.mp3 author should output the author-tag of an mp3-file.

share|improve this question
up vote 14 down vote accepted

Ok, I found a program by myself. It is called mp3info and installed by

sudo apt-get install mp3info

To get single mp3 tags from a file, one has to call

mp3info -p %a file.mp3

which gives the artist of the file. The %a means that one want to get the artist and there are some other keys for the other tags.

share|improve this answer
Additional info: There are 4 different standards of mp3 tags id3v1, id3v2.2(obsolete), id3v2.3, id3v2.4 A file can have v1 and/or v2 tags (Yes v1 and v2 can coexist, but v2.x and v2.y cannot coexist). I believe v2.3 is the most widely used one. According to (See Todo) v2 tags are not supported by mp3info. You might want to look at id3v2 - It can edit/add v2 and display v1 and v2. If you don't like the way it displays the tags you can write a script that runs id3v2 and processes the output appropriately. – S Prasanth Dec 11 '12 at 8:04
@SPrasanth how to make it to display a specific tag. For example: only the artist of an mp3 file? – Gowtham Apr 23 '14 at 11:10
@SPrasanth I got it. Thanks I'm using -R flag with grep to get the specified output. – Gowtham Apr 23 '14 at 11:14

You can use eyed3. First, from a terminal, install:

sudo apt-get install eyed3

Then, run:

eyeD3 song.mp3

Combine that with grep to get specific tags in one line.

eyeD3 song.mp3 | grep artist

(to strip all mp3 tags, see HERE)

share|improve this answer
I tried this, and the command to use is eyeD3, with an uppercase D ;). But I found another tool, which better matches my needs, named mp3info. This can output mp3 tags without the need to use grep, which I prefer. – red_trumpet Dec 8 '12 at 13:29
eyeD3 works better for me because it works with id3v2, but @red_trumpet is right, the command should be eyeD3 not eyed3 – bmaupin May 29 '13 at 4:03

Check out lltag if you are looking for a solution which supports more than just mp3/ID3.

Install it with:

sudo apt-get install lltag

to view all tags with it: (-S is for show)

lltag -S somefile.mp3

to view certain tags with it:

lltag --show-tags artist,album,title,number somefile.mp3
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.