Install Audio

With the Pi connected to the Internet and SSHed in (see our previous tutorial), install the Alsa audio drivers and the mpg123 MP3 Player:

sudo apt-get update
sudo apt-get install alsa-utils mpg123

You'll probably be prompted to continue. Press y for yes.

Next, reboot the Pi by typing sudo reboot. If you're using SSH, you'll have to reconnect after it boots.

Once you're logged back in, load the sound drivers and do some setup for the 3.5mm jack output:

sudo modprobe snd_bcm2835
sudo amixer cset numid=3 1
This guide was first published on Jul 29, 2012. It was last updated on Oct 17, 2018. This page (Install Audio) was last updated on Nov 23, 2015.