Skip to content
ripcd with abcde

Ripping CDs on Linux with abcde, Made Simple

Feb 1st 2026Scripts

TL;DR:

I use abcde on Linux to rip CDs, and I love it. I wrote a small wrapper script called ripcd that detects all loaded CD drives, lets me rip one or all at once, and opens each disc in its own terminal tab. Everything rips to lossless FLAC by default. It is simple, fast, and removes a lot of manual steps when ripping multiple CDs.

 

Photo Credit

Photo was taken by myself at a New Found Glory show in 2017 at the Catalyst Club in Santa Cruz, CA.

I still buy music.

 

Part of that is nostalgia, and part of it is a conscious choice. Music has always been a big part of my life. Punk rock, hardcore, metal, indie. I like owning the album, the artwork, the liner notes, and having a physical copy that lives on my shelf.

 

Because of that, I buy CDs and records, then rip my CDs into a lossless music library that I keep for myself. I stream that library to my devices so I can listen wherever I am, without depending on third-party services.

 

No piracy. No sketchy sources. Just music I bought and ripped for my own collection.

 

I already had a setup I liked. I just wanted to make it easier to use.

 

A quick personal note on supporting artists

I want to be explicit about something that matters to me. I believe in supporting artists and musicians directly. That means buying records and CDs, going to shows, and paying for the music that means something to you.

Everything described here is about ripping music I already own for my personal library. No piracy, no file sharing, no gray areas. Just taking physical media I paid for and making it usable in a modern, self-hosted setup.

If you care about music, especially local scenes and independent artists, the best thing you can do is support them with your money and your time. Buy the album. Go to the show. Talk to the band at the merch table. The tools are just tools. The point is the music and the people who make it.

 

A few local bands worth supporting

Since I’m talking about buying music and supporting artists, I’d be remiss not to call out a few local bands that have meant a lot to me as of recent. These are artists I’ve seen live, bought records from, and still listen to regularly.

 

Outpatient X  - Santa Cruz, CA
Bunker Club - Paso Robles, CA
Whats Good - Santa Cruz, CA

 

Why I use abcde on Linux

I really like abcde.

 

It is one of those Linux tools that has been around forever for a reason. It is reliable, flexible, and does exactly what it is supposed to do. Ripping, tagging, metadata lookups, encoding. It handles all of it without getting in the way.

 

I had no interest in replacing abcde or wrapping it in a heavy UI. I just wanted a better workflow when ripping more than one CD at a time.

 

A better multi-drive ripping workflow

I wrote a small wrapper script around abcde and called it ripcd.

From a terminal, I type:
 

ripcd


The script checks all connected optical drives, detects which ones actually have discs loaded, and shows a simple menu. I can select a single drive or press a to rip all loaded CDs at once.

 

When ripping multiple discs, each CD opens in its own terminal tab. That keeps metadata prompts clean and makes it easy to work through several discs in parallel without mixing things up.

 

At that point, abcde takes over and does what it already does best.

FLAC only, by design

This script always rips CDs to lossless FLAC.
 

That choice is intentional. My goal is a clean archive, not a dozen encoding options. I keep one high-quality copy and convert formats later if I need to.


If you want different behavior, the abcde command is easy to change. The script is simple and readable on purpose so it can be adapted without much effort.

Why this setup works for me

I enjoy building and maintaining my own music library. I enjoy Linux tools that respect my time. I enjoy small bits of automation that remove friction instead of adding complexity.


Once ripping CDs became something I could start and mostly ignore, I knew the workflow was right.

Below this post you will find instructions for installing abcde on Fedora KDE, Ubuntu, and similar Linux setups, along with the full ripcd script. Everything is shared directly on the page so you can copy, paste, and tweak it for your own system.

Installing ripcd

ripcd is a simple shell script. There is no installer. Copy it into place, make it executable, and you are done.

You can install it per user or system-wide.

 

The Script

#!/usr/bin/env bashset -euo pipefail # Detect optical drives with media insertedget_drives_with_media() {  for dev in /dev/sr*; do    [[ -e "$dev" ]] || continue        # Check if media is present    if udevadm info -q property -n "$dev" 2>/dev/null | grep -qx 'ID_CDROM_MEDIA=1'; then      echo "$dev"    fi  done} # Detect available terminal emulatordetect_terminal() {  if command -v konsole >/dev/null 2>&1; then    echo "konsole"  elif command -v gnome-terminal >/dev/null 2>&1; then    echo "gnome-terminal"  elif command -v xterm >/dev/null 2>&1; then    echo "xterm"  else    echo ""  fi} # Find drives with mediamapfile -t drives < <(get_drives_with_media) if (( ${#drives[@]} == 0 )); then  echo "No discs detected in any optical drives."  exit 1fi # Show menuecho "Discs detected:"echofor i in "${!drives[@]}"; do  echo "  $((i+1))) ${drives[$i]}"doneechoecho "  a) ALL (rip all drives simultaneously in tabs)"echo "  q) Quit"echo read -rp "Select (1-${#drives[@]}, a, q): " choice # Handle choicecase "${choice,,}" in  q)    echo "Quitting."    exit 0    ;;      a|all)    term="$(detect_terminal)"        if [[ -z "$term" ]]; then      echo "No supported terminal found. Cannot open tabs."      exit 1    fi        case "$term" in      konsole)        echo "Opening Konsole with ${#drives[@]} tabs..."                # Start an empty Konsole window        konsole &        konsole_pid=$!        sleep 1.5                # Find the D-Bus service        service="org.kde.konsole-$konsole_pid"                # Check if the service exists        if ! qdbus | grep -q "$service"; then          echo "Could not connect to Konsole via D-Bus, opening separate windows instead..."          for dev in "${drives[@]}"; do            konsole -e bash -lc "abcde -d '$dev' -o flac; echo; echo 'Done. Press Enter to close.'; read" &            sleep 0.3          done          exit 0        fi                # Process each drive        for i in "${!drives[@]}"; do          dev="${drives[$i]}"                    if (( i == 0 )); then            # First drive: use the existing session            session=$(qdbus $service /Windows/1 currentSession 2>/dev/null)          else            # Additional drives: create new tabs            session=$(qdbus $service /Windows/1 newSession 2>/dev/null)            sleep 0.5          fi                    if [[ -n "$session" ]]; then            # Set tab title            qdbus $service /Sessions/$session setTitle 1 "abcde $(basename "$dev")" 2>/dev/null                        # Send the command            qdbus $service /Sessions/$session sendText "abcde -d '$dev' -o flac" 2>/dev/null            qdbus $service /Sessions/$session sendText "$(printf '\r')" 2>/dev/null                        echo "Started ripping $dev in tab $((i+1))"          fi        done                echo ""        echo "All tabs created! You can:"        echo "  - Press Ctrl+Shift+* to split tabs side-by-side"        echo "  - Use Ctrl+Shift+Left/Right to switch between tabs"        ;;              gnome-terminal)        echo "Opening ${#drives[@]} tabs in GNOME Terminal..."        cmd="gnome-terminal"        for dev in "${drives[@]}"; do          cmd="$cmd --tab --title='abcde $(basename "$dev")' -- bash -lc \"abcde -d '$dev' -o flac; echo; echo 'Done. Press Enter to close.'; read\""        done        eval "$cmd" &        ;;              xterm)        echo "Opening ${#drives[@]} separate xterm windows..."        for dev in "${drives[@]}"; do          xterm -title "abcde $(basename "$dev")" -e bash -lc "abcde -d '$dev' -o flac; echo; echo 'Done. Press Enter to close.'; read" &        done        ;;    esac        echo "All ripping processes started!"    exit 0    ;;      *)    # Check if it's a valid number    if [[ "$choice" =~ ^[0-9]+$ ]] && (( choice >= 1 && choice <= ${#drives[@]} )); then      dev="${drives[$((choice-1))]}"      echo "Ripping ${dev}..."      exec abcde -d "$dev" -o flac    else      echo "Invalid selection."      exit 1    fi    ;;esac

Option A: User-only install (recommended)

Copy the script to:

~/.local/bin/ripcd

 

Make it executable:

chmod +x ~/.local/bin/ripcd

Most modern distros already include ~/.local/bin in your PATH.

Option B: System-wide install

Copy the script to:

/usr/local/bin/ripcd

 

Make it executable:

sudo chmod +x /usr/local/bin/ripcd

This makes ripcd available to all users.

Optional: Close the launching terminal

If you want the terminal you run ripcd from to close after launching abcde, add an alias

User-only alias

Add to ~/.bashrc:

alias ripcd='~/.local/bin/ripcd && exit' 

 

Reload your shell:

source ~/.bashrc

System-wide alias

Create:

sudo nano /etc/profile.d/ripcd.sh

 

Add:

alias ripcd='ripcd && exit'

Using ripcd

Run:

ripcd 

 

The script will:

  • Detect all connected optical drives

  • Check which drives have discs loaded

  • Show a menu of available options

Select a single drive or press a to rip all loaded CDs at once.

When ripping multiple discs, each CD opens in its own terminal tab or window. abcde then runs normally and prompts for metadata as needed.

 

Notes

  • abcde must already be installed and working.

  • All rips are done in lossless FLAC.

  • Supported terminals: Konsole, GNOME Terminal, xterm.

  • The abcde command inside the script can be modified if you want different options.

Josh Fridey

Josh Fridey

IT Manager
Business: AB ComputerWebsite: www.abcomputer.com

About the author:

Hi, I’m Josh Fridey, a Senior IT Manager with over 15 years of experience in the field. My work has centered around supporting companies that develop and deliver tech solutions for other businesses—especially in industries like agriculture, healthcare, construction, and petroleum—helping them grow through dependable, well-structured IT.

Scratch Contact Us

You can contact my best friend and food provider with this form. Suggestions, corrections, and questions are always welcome! Please also message me French fries...

Scratch