Having trouble getting your voice heard on video calls or recordings? Verifying your microphone works is the first step. This guide will show you two easy methods to test your microphone in Linux, whether you prefer using the system settings or the command line.
We can test if the microphone is working in Linux in two ways.
- From Sound Settings (GUI)
- Using alsa-utils (CLI)
Let us see both. First, we will see the GUI way.
Table of Contents
Check if Your Microphone is Working from GUI
To test your microphone in Linux desktop systems, navigate to the Sound settings. Here's how to access the Sound Settings in different Linux desktop environments:
GNOME:
- Open the Activities overview.
- Search for and click on "Settings".
- In the Settings window, click on the "Sound" icon.
KDE Plasma:
- Click on the Application Launcher (usually in the bottom-left corner).
- Search for and click on "System Settings".
- In the System Settings window, click on the "Multimedia" icon, then select "Audio".
Xfce:
- Right-click on the desktop and select "Open Terminal".
- In the terminal, run the command:
xfce4-mixer
. - This will open the Xfce Sound Settings.
Ubuntu (with GNOME):
- Click on the Activities overview.
- Search for and click on "Sound Settings".
Linux Mint (with Cinnamon):
- Click on the Menu icon.
- Search for and click on "Sound Settings".
The general process is to look for an icon or menu entry related to "Sound", "Audio", or "Multimedia" settings. The exact location may vary slightly depending on the desktop environment, but these steps should help you find the Sound Settings in most common Linux distributions.
For the purpose of this guide, I will be using Cinnamon Desktop environment. In Cinnamon, Sound tab appears under the Hardware section in the System Settings. Click on "Sound" to open the Sound Settings panel.
In the Sound Settings panel, you can adjust various audio settings including input and output devices, volume levels, and sound preferences.
Click the "Input" tab. Select the microphone if you have multiple devices attached. Speak into the microphone. If the input level meter moves, your microphone is working.
If it isn't working, the meter will not move.
Test Your Microphone from Command line
To test your microphone from the command line in Linux, follow these steps:
Open the terminal.
Run the arecord
command. This command will record a 5 second audio from your microphone.
$ arecord --duration=5 test.wav
Or shortly:
$ arecord -d 5 test.wav
This will create a file named "test.wav" in your current directory. Replace 5
with the number of seconds you want to record.
After the recording, play back the audio using the aplay
command.
$ aplay test.wav
If you hear the audio you recorded, your microphone is working correctly.
Note:
The
arecord
andaplay
commands are provided by thealsa-utils
package in Debian-based systems. So if those commands are not available, simply install thealsa-utils
package using your default package manager. The package name might be different in other Linux distributions. To know which package provides a specific command, refer the following link:
Conclusion
Testing your microphone in Linux is straightforward. You can do it graphically through the Sound Settings, or use the command line with the arecord
and aplay
commands.
The exact steps may vary slightly depending on your Linux desktop environment, but the general process is similar. By following these simple steps, you can quickly verify that your microphone is working properly in your Linux system.
Related Read: