Get the audio output selected on boot

Kind of a novice question but how can i get the audio output selected on the boot sequence if i log in via SSH and can it be changed after booting up the system.