How do I permanently turn off the HUD (compass bearing) in the cockpit view?
Although uncorrect, in IL-2 game HUD is meant as info lines about engine etc. appearing on right side of screen.
Since you wrote "compass", I guess you refer to heading that is in lower left corner of screen. If so, you must set a key in "Controls" menu to "Toggle Speed Bar" (e.g.: Alt B); each time you'll press this key during simulation, Speed Bar will switch from metric to british, then naval units of measure and last none.
S!
GB
P.S.: unfortunately, there's no way to get that permanently: you shall repeat process to hitting three times set key at each and every new mission start.