I'm trying to add a login sound to Raspbian, but I have no idea how to do it. Just so you know, when I mean login sound I mean after you type you user name and password. Anyone got any suggestions.

If it helps, I have a:

Brand: Raspberry Pi

Model: B

Operating System: Raspbian "Wheezy"

Size: 8 Gigabytes

1 Answer 1


If you mean the virtual console login, you could add a command to your .bashrc file to play a sound file. This will be played anytime you login or create a new terminal emulator window.

An example would be mplayer login.ogg &. You'll need a sound from somewhere.

Is there a reason for this, though? Something else may be more fitting.

  • what would the command be and were should I add it
    – Daniel
    Commented Jun 3, 2013 at 23:14
  • Open .bashrc in your home folder with a text editor and add mplayer /path/to/sound.ogg to the very end (if the file exists. If it didn't already exist, creating a new .bashrc is fine). Remember you need a sound file already.
    – Torvero
    Commented Jun 3, 2013 at 23:16
  • does it have to be .ogg? I also noticed that "mplayer" doesn't seem to be a real command.
    – Daniel
    Commented Jun 3, 2013 at 23:22
  • Sorry I'm a bit late! mplayer is not installed on most distros be default. Install it with sudo apt-get install mplayer. Anyway, did you find another solution or use mplayer? If this was how you solved your problem, please mark it as the answer! ;)
    – Torvero
    Commented Jun 4, 2013 at 18:14
  • Possibly use aplay which is pre installed in raspbian Commented Apr 28, 2017 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.