Ubuntu server: install Alsa sound and MOC (Music On Console)
1. To install Alsa sound (alsa-base, alsa-utils, alsa-tools and libasound2) enter this command:
sudo apt-get install alsa alsa-tools
2. Add yourself to the group audio:
sudo adduser yourusername audio
3. Reboot to take effect
sudo init 6
4. Alsamixer is sometimes muted by default, so you might need to unmute it. Run alsamixer:
alsamixer
Use arrows up
and down
to change volume, left
and right
to change source. To mute/unmute press M
.
Note: Alsamixer might look different in any machine. It depends on your sound device (sound card). Please, read audio source labels. For example: PCM in Virtualbox is on fifth place instead of the second in VMWare.
Alsamixer in VMWare
Alsamixer in Virtualbox
To quit press Q
.
If any error occurs, look here.
Play some music
1. Install MOC (Music On Console) player:
sudo apt-get install moc
2. Run MOC:
mocp
Press H
for HELP.
You can also try MPlayer, mp3blaster, CMus.
RoSi
26 Mar, 2010
Well done … I was trying to do exactly same thing. One step where I seems to fail is un-mute master and PCM in alsa mixer. Looking forward to try it again. Thank You!
RoSi
27 Mar, 2010
Unfortunately, it didn’t work for me. I assume, that Virtualbox might be a problem. I need to test it on real hardware. Shame it might take me another 32 years. But thanks anyway.
enjoy
27 Mar, 2010
I’ll try it in Virtualbox, and I will let you know about it.
RoSi
27 Mar, 2010
Yes, yes, yes! Note has fixed it. Mechanicly I was pulling up first two thingis in alsamixer, instead to read which one is PCM. Thank You!
enjoy
27 Mar, 2010
You’re welcome :)
Steve
29 May, 2010
[…] Ubuntu server: install Alsa sound and MOC (Music On Console) « How to […]
Emily
3 Jun, 2010
Yes, yes, yes! Note has fixed it. Mechanicly I was pulling up first two thingis in alsamixer, instead to read which one is PCM. Thank You!
yungchin
20 Sep, 2010
Thanks that was useful! I had totally forgotten the part about having to be in the audio group…
Btw, I didn’t need any rebooting, it was sufficient to just logout to effect the group addition. (Well actually I’d also fiddled around sending an “alsactl init” before, when I didn’t get the problem that my user wasn’t in the right group, so maybe that’s also needed if you don’t want to reboot).
disqus_4eC2RQ9njo
15 Sep, 2013
Thank you!