Edit MP3 Tags (Artist, Album, Track) with id3v2

Read and rewrite the ID3 metadata of MP3 files from the terminal so music libraries organize songs under the right artist and album.

Linuxaudiomp3cliid3v2Low risk
Run id3v2 -a "Artist" -A "Album" -t "Title" -T 3 song.mp3 to set artist, album, title and track number, and id3v2 -l song.mp3 to check them.

01Command

Command
$ id3v2 -a "Artist Name" -A "Album Name" -t "Song Title" -T 3 song.mp3 && id3v2 -l song.mp3

02What it does

id3v2 is the standard command-line editor for the ID3 tags embedded in MP3 files: -a sets the artist, -A the album, -t the title and -T the track number. Tags are what players use to sort music — filename changes never affect them, which is why downloads often land in 'Unknown Artist'. For a batch fix, loop over a folder (for f in *.mp3; do id3v2 -a "X" "$f"; done) and use -l or -L to print current tags before and after.

03Risk

RiskLow risk
Requirementsid3v2 (sudo apt install id3v2 / sudo dnf install id3v2)
!Warning: id3v2 writes tags in place with no confirmation; set every field explicitly because fields you leave out keep their old (possibly wrong) values.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-18 · Category: Media