Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I need to deploy linux ubuntu servers (no desktop) with the ability to play audio files from command line. After installing the ubuntu 12.04 server edition I installed:

sudo apt-get install libasound2
sudo apt-get install alsa-utils
sudo apt-get install mplayer

and then added my user to the audio group

sudo usermod -a -G audio myusername

After these operations I opened amixer and did rise all outputs to 100% on. The problem is that I still cannot have any audio output. I know for sure that the audio card works since when I run lubuntu live 12.04 on the same pc I can hear the audio output. Does anybody know what I'm missing to have the server edition play audio files?

EDIT: Well I found out the problem was the "Simple mixer control 'PCM',0" was off and this was the reason why the audio was not working. The command

amixer -c 0 set 'PCM' 90% on

did solve my problem. Well at least I think in this post there are all the command needed to activate audio on an ubuntu server. To display the current audio levels just type


and finally, after 'PCM', it is important to check that 'Master' is 100% on:

amixer -c 0 set Master 100% on
share|improve this question
Output from mplayer? –  Jiri Xichtkniha May 15 '12 at 19:53
Thank you the problem was solved, I missed the [off] on PCM –  giuspen May 16 '12 at 8:10

Your Answer


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

Browse other questions tagged or ask your own question.