Sox...
Code:
sox -w -s -r 44100 -c 2 /dev/dsp -t raw - | lame -x -m s - filename.mp3
You may need to change this a bit depending on your setup.
Though, pretty much any sound recorder should work fine. If you use KDE then krec will do the trick. You will need to convert to mp3 manually though, as I believe it will be in wav format.
You could also use audacity. Just make sure your input levels are up and press record (the red circle button

)