Get the audio from Line-in to output to the speaker

I have connected a console to the line-in of my computer. How can I make it so that the sound comes out of the speakers?

I've tried alsamixer and it didnt help

Im using Ubuntu 12.04


Try use the pulse audio: module-loopback, this module loops all incoming audio back through your outputs ,that isn’t enabled in Ubuntu by default.

# Manually start the module-loopback.
pactl load-module module-loopback

# Configure your system to load module-loopback on startup.
# This places load-module module-loopback at the end of
# the /etc/pulse/default.pa pulseaudio configuration file.
sudo sh -c ' echo "load-module module-loopback" >>  /etc/pulse/default.pa '

This solution is copied from PulseAudio: Monitoring your Line-In Interface .


modification to xranby's answer:

I was having a problem with latency where there was quite a noticeable amount of lag between my button-press and the "immediate" sound.

This fixes that: pactl load-module module-loopback latency_msec=1

source of fix: http://thelinuxexperiment.com/fix-pulseaudio-loopback-delay/comment-page-1/#comment-2762


In the end I entered into "alsamixer" and rised the level of the Line-in, which was at 0 and it worked (in Ubuntu 10.13)