There are a few options for ripping your CDs from the command line, but abcde is easily the most widely available and one of the easiest to work with. You can use it for simple one off rips, or you can configure it to your exact specifications for every use.
In this tutorial you will learn:
- How to Install abcde
- How to Rip a CD with abcde
- How to Configure abcde
Software Requirements and Conventions Used
|Category||Requirements, Conventions or Software Version Used|
|System||Ubuntu, Debian, Fedora, OpenSUSE, and Arch Linux|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
abcde is a popular open source tool for Linux. It’s found its way into the repositories of every major distribution. So, before you get started ripping your CDs, install abcde using your distribution’s package manager.
$ sudo apt install abcde
$ sudo dnf install abcde
$ sudo zypper install abcde
$ sudo pacman -S abcde
Rip a CD with abcde
Now that you have abcde installed, you can try it out. Put a music CD into your computer’s drive, and open up a terminal.
The command for abcde is fairly simple. That’s because most of the options the application uses are specified in a configuration file. You can specify as many or as few options as you like to override the ones in the config. You should, depending on the location where your drive is mounted, be able to run abcde right now, without any options. The command will rip your CD in the present working directory and produce OGG files.
There’s a decent chance that it didn’t work. The default CD drive location of abcde is
/dev/cdrom, and not many distributions are still using that configuration. Instead, specify the drive location with
-d, and try either
/dev/sr1. Certainly, if you know the exact location, use it.
abcde -d /dev/sr0
Before it actually gets to work ripping, abcde is going to ask you a few questions about your CD. First, it will retrieve the information it can using Musicbrainz and display it. It will display all the possible options that it found. Enter the number of listing you want to use.
Then, it will ask if you want to edit any of the track information.
As long as everything’s correct, press n. Next, abcde will ask if this is a multi-artist CD. Again, press n, unless it is. Once you do, abcde will get to work ripping your CD.
When abcde is finished, it will display a message letting you know, and drop back to the command prompt. Run
lsto see the folder containing your newly ripped music.
There’s a good chance that you want your files in one or more specific formats. Dont’ worry, abcde can easily do that too. Just specify them in a comma-separated list using the
$ abcde -d /dev/sr0 -o flac,mp3
Depending on how in-depth you want to get in controlling your CD rips, specifying all the options you need can be tedious and tiresome. Remember that confugration file? That’s the key to simplifying abcde. Start by creating a local copy of the default config.
$ sudo cp /etc/abcde.conf ~/.abcde.conf
Then, give yourself ownership.
$ sudo chown username:username ~/.abcde.conf
Now, you can open up the configuration and edit it with your favorite text editor.
$ vim ~/.abcde.conf
There are a lot of options in the configuration. You probably won’t use 90% of them. There are, however, a few key options.
First, search for
CDDBMETHOD. The default is Musicbrainz, but if you’d prefer another database, you can change it here.
Now, to handle that CD drive issue, look for
CDROM. Uncomment it, and set the value to the actual path to your CD drive.
Next, take a look at
WAVOUTPUTDIR. Thse specify where your music and the original WAV files that abcde uses to convert end up. Change this to your music directory or wherever you prefer.
You can use the
OUTPUTTYPEvalue to change the default output file format. The same applies here, where you can use a comma-separated list as well.
OUTPUTFORMATThis lets you choose the directory structure and naming conventions used for your files. The confugration file gives you a set of variables to work with.
Feel free to look around some more and set up anything else you want. When you’re done, save and exit. Now, you should be able to run abcde by itself with no options to rip your CDs exactly to your specifications.
abcde doesn’t change or get updates very often, but if you’re looking for a command line option, that’s probably a selling point. The real power here comes from the configuration. It can seriously simplify your CD ripping process, and save a ton of time. Plus, you know you’ll always be getting exactly what you bargained for.