Commander is a rank used in many navies and some air forces . It is rarely used as a rank in armies , except in special forces for a team leader . Commander is a rank used in many navies and some air forces but is very rarely used as a rank in armies ( except in special forces where it designates the team leader ) .