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.
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.mp302What 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
!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
- id3v2(1) — Linux manual pageEvidence: id3v2 edits ID3v1/v2 tags: -a artist, -A album, -t title, -T track number, -l lists the current tags of a file.
- id3v2(1) — Linux manual page (alternate mirror)Evidence: Lists all id3v2 editing options including -A album, -t title, -T track, and -L listing supported frames.
Last verified: 2026-09-18 · Category: Media