Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have one music playing, and i have microphone open, already the microphone is used by other application.

In such case, how can i record that music and the microphone audio to a file? (if possible with command line).

Follow up:

$ rec new-file.wav

Input File     : 'default' (alsa)
Channels       : 2
Sample Rate    : 48000
Precision      : 16-bit
Sample Encoding: 16-bit Signed Integer PCM

In:0.00% 00:00:25.94 [00:00:00.00] Out:1.24M [      |      ]        Clip:0    ^C

$ sox −d new-file.wav
share|improve this question
up vote 1 down vote accepted

Install audacity and select the record source to ALSA: default. This will record everything. Try experimenting with audacity, there are many useful settings.

share|improve this answer

When music is playing, it will also be captured by your microphone if it is loud enough, so you can just record the microphone, or add the music later by editing

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.