Ferdinand Bauer enrolled in the Imperial and Royal academy of engineers in 1836, was commissioned as a lieutenant in the corps of engineers in 1841, and was placed on active service as a Hauptmann in 1848. In 1849 he fought for the Habsburgs in the Hungarian Revolution. He was promoted to major in 1859 and fought as a brigade commander in the Third Italian War of Independence.