I had looked this up a couple years ago, and it seems updates have allowed this to become easy to do. There exists a technique that can simulate surround sound (3D audio), using a process known as Binaural recording. Originally, this would be done by placing microphones in a person (or mannequin’s) ears, and recording audio in a way that will simulate what a person would have heard upon playback. This process can be emulated through software, and it seems the version of OpenAL shipped with Minecraft natively supports it. To enable this, simply run this command in the terminal:
echo "hrtf = true" >> ~/.alsoftrc
This will set a flag in the OpenAL configuration file to enable it. Please note, this only applies to headphones with stereo audio, and does not actually generate full surround sound from Minecraft’s stereo audio output. More information about the configuration, including advanced settings can be found on this blog post.