system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: If two countries go to war, how can the opposing army know which army is theirs without accidently shooting their own teammates?

Does every army in every country have a different uniform? Or do they all wear camouflaged suits or something.
gpt
Different uniforms, identifying colors in helmets/on person, passwords/codewords and just generally if you're being shot at it's likely it's the enemy firing. Also officers are briefed which direction enemy is at and they brief their people. 

Comms, comms, comms. Very important.