Install cd-discid by entering the following commands in the terminal:
sudo apt update sudo apt install cd-discid
CDDB DiscID utility
In order to do CDDB queries over the Internet, you must know the DiscID of the CD you are querying. cd-discid provides you with that information. It outputs the discid, the number of tracks, the frame offset of all of the tracks, and the total length of the CD in seconds, on one line in a space-delimited format. cd-discid was designed as a backend tool for cdgrab (now abcde) but will work independently of it.