The U.S. military had a long tradition of glorious beards — until WWI when the need for properly sealed gas masks outweighed the benefits of intimidation through superior facial hair. Today, deployed special-operations troops and troops in outlying FOBs or submarines have some leniency, but it all depends on what your rank and unit can afford. Exceptions can be made for religious or medical reasons, but the average Joe will need to shave every day.
The salt sprinkled on the wound is watching our allies grow beards that put every hipster to shame. But just because they can grow a beard, doesn't mean that they don't have a standard to follow. Every nation's armed force has a different policy.
Some only allow a neatly trimmed pencil mustache, like the Americans, while others only allow their Navy to sport beards. Some only allow neatly trimmed beards if they're properly cared for and remain a certain length and others just say, "f*ck it," and let their boys look like lumberjacks.
The Brits have a policy on facial hair very similar to the Americans'. Mustaches are fine, but you can't grow anything else. This goes for everyone except the Royal Navy, which allows beards but forbids mustaches alone.
There is an awesome exception for Pioneer sergeants, however, who grow out beards for ceremonial purposes. Historically, these sergeants were the blacksmiths of the unit and the beard protected their faces from forge flames.
Spanish troops are held to the most relaxed facial hair standards. If you can grow a beard, go for it. If your little whiskers are trying to poke through, keep at it.
The only restriction is that it must be a full beard. No goatees or muttonchops — it's all or nothing.
German troops are allowed to grow their beards as long as they are trimmed, unobtrusive, and well-kept. As long as a troop can still wear a gas mask, they can keep the beard. What makes German troops stand out is that they are not allowed to have stubble.
So, the only way to keep facial hair is if you can grow a majestic enough beard while on leave. If their command approves of the beard upon return, they can keep it. If not...
The French allow their troops to grow beards off duty or on leave, but never in uniform. That is, except for the Sappers — they must grow a beard.
The French Foreign Legion's Sappers are encouraged to grow a long, beautiful beard. If they are chosen to participate in the Bastille Day parade, they must not shave and let their fully decorated chins march down the Champs-Élysées.
The Viking-blooded troops also rock their beards under a few conditions: They mustn't be in the Royal Guard, they must get express permission to grow one, or they can grow one on deployment.
If you enlisted in the Norwegian Armed Forces with an outstanding beard, however, you may request to keep it. The beard must stay at the length it is on your ID for its lifespan.