How to cut, split or edit mp3 file on Linux

If you are a music enthusiast, you may often want to edit MP3 files for various reasons. For example, you may want to trim or chop MP3 files to get rid of silence at the beginnings and ends. Or you may want to split a big MP3 file into smaller segments of certain lengths.

In Linux, there are many free MP3 editor software tools at your disposal. In this tutorial, I will explain how to cut, split or edit MP3 files by using a Linux tool called audacity.

audacity is one of the best known open-source software for recording and editing audio data. It is available for Linux, Windows and Mac OS.

Install Audacity on Linux

audacity is included in the base or third-party repositories on major Linux distros. Thus you can easily install it from an appropriate distro-specific repository.

To install audacity on Ubuntu or Debian, simply run:

$ sudo apt-get install audacity

To install audacity on CentOS/RHEL 5, first enable Repoforge repository, and then run:

$ sudo yum install audacity

To install audacity on CentOS/RHEL 6, first enable EPEL repository, and then run:

$ sudo yum install audacity

To install audacity on Fedora, simply run:

$ sudo yum install audacity

Edit MP3 File with Audacity

audacity allows you to cut, copy, split, or merge audio data. To edit an MP3 file, open it with audacity as follows.

$ audacity input.mp3

The audacity interface looks like the following.

If you want, zoom in the file view area by pressing Ctrl+1 key.

Then select the region to edit by mouse clicking and dragging left-selection boundary.

Once the region to edit is selected and highlighted as above, you can cut, copy or paste the selected region by using Ctrl+X, Ctrl+C, and Ctrl+V respectively.

After finishing editing, you can export the edited content to a separate MP3 file. During file export, you can edit the metadata of the exported MP3 file by using audacity's built-in MP3 metadata editor, as shown below.

Note that running two instances of audacity simultaneously on your system may cause data loss or cause your system to crash. To work on multiple MP3 files, use "Open" or "New" menu in the current instance of audacity instead.

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

The following two tabs change content below.
Dan Nanni is the founder and also a regular contributor of Xmodulo.com. He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.
Your name can also be listed here. Write for us as a freelancer.

20 thoughts on “How to cut, split or edit mp3 file on Linux

      • Yes, looks like no source on the site. I have only added it because it does a quite good job, and for me was better then Audacity. However, the rpm works well.

        • I'll have to give it a try. I find it odd though; it is my understanding that with Brazil's opensource policy set in laws approved in the last 5 years, all federally funded software development has to be released under an OSI compliant license. I can be wrong though.

  1. Don't forget to install the extra package that will give you access to more sound processing options. I can't remember what it's called though! Vts or similar.

  2. I've been using Audacity recently for creating 'Name that theme tune' type game with 10, 10 second blasts of tune, between which numbered jingle for fun party games at Christmas... Perfect :-)

  3. No no no!

    If you do it that way (using Audacity) it will decode, let you edit, then encode again! So you will have loss of quality.

    I don't know of any FOSS lossless editors, I still use mp3cut, a free windows lossless editor that works very well with wine (even drag/drop works).

    For lossless video cutting and trimming, use AviDemux

    • Ardour is not going to cut/split mp3 lossless (AFAIK). Anyway, if you're going to edit sound files, your source shouldn't be mp3 anyway. mp3 is only OK as a publishing format.

  4. Be careful, Audacity DOES NOT do real splits. It re-encodes the target audios. Example: you want to split a long mp3 at 128 kbps bitrate to several smaller chunks of mp3 at the same bitrate. What Audacity does is to convert the original mp3 in its intermediate working format, then re-encode the final mp3 chunks.

  5. I've used Audacity very successfully for years to record audio.
    As you all know it can record in WAV format and you can set the bitrate. Far superior sound quality to crappy mp3 format, Why would you want mp3 format unless you are clearly lazy? In today's world where it doesn't cost much to own a 3TB drive you'll have plenty of space to have all of your audio in WAV or FLAC format. I am a complete hypocrite of course as I have shed loads of mp3 files aquired from friends and have never bothered to convert them, what would be the point anyway? Don't knock Audacity, at the end of the day it's free! Thank you to all the devs who created this wonderful amazing audio editing tool! :-)

Leave a comment

Your email address will not be published. Required fields are marked *