Cephalexin is a cephalosporin antibiotic and is used to treat bacterial infections as well as skin infections, upper respiratory infections, urinary tract infections, and ear infections. It is available in the form of tablets, capsules, and in liquid form. Cephalexin works similarly to penicillin. It fights bacteria by slowing their growth and preventing the production of the bacterial cell wall. This exposes the bacteria to the external environment due to which they are unable to survive.
However, Cephalexin should not be used to treat viral infections including flu and cold. Also, misusing or taking Cephalexin unnecessarily can decrease its effectiveness.