Troubleshooting audio input issues on a headless Linux server or within a minimalist window manager can be difficult without a graphical settings panel. If you have plugged in a USB microphone and need to verify that it is actually capturing sound (and that the volume isn’t muted or too low), you can use a simple command-line utility built into ALSA (Advanced Linux Sound Architecture).
The arecord command allows you to capture raw audio input directly from the terminal, complete with a visual volume meter.
How to Test Microphone Input with a Visual Meter (VUMeter)
Instead of blindly recording a file and playing it back, you can instruct arecord to display a live, real-time volume meter directly in your terminal window.
- Open your Ubuntu Terminal.
- Type the following command and press Enter:
arecord -V mono /dev/null
What this command does:
The -V mono flag tells the application to display a visual (V) mono volume meter. Instead of saving the audio to a file, we direct the output to /dev/null, effectively deleting the recording in real-time so it doesn’t waste disk space.
How to Read the Results
As soon as you run the command, start speaking into your microphone. You will see a bar made of hash symbols (#) rapidly expanding and contracting across the terminal screen in response to your voice.
- If the bar jumps heavily when you speak (reaching 50-80% of the screen width), your microphone is working perfectly and the input volume is healthy.
- If the bar barely moves (only 1 or 2 hashes), your microphone is connected, but the input volume is set far too low in the
alsamixersettings. - If the bar does not appear at all, or the terminal throws an error, Ubuntu cannot detect your microphone hardware.
When you are finished testing, press Ctrl + C to cancel the arecord process and return to your standard command prompt.