Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 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

I recently had a similar issue on my Ubuntu 12.04 system. Clearly sound was working on the system since I had no issues with games and mpg123, but I was unable to get any audio output from mplayer. I solved it in this simple way:

sudo apt-get install mplayer2
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.