Cefalexin , also spelled cephalexin, is an antibiotic that can treat a number of bacterial infections.[4] It kills gram-positive and some gram-negative bacteria by disrupting the growth of the bacterial cell wall.[4] Cefalexin is a beta-lactam antibiotic within the class of first-generation cephalosporins.[4] It works similarly to other agents within this class, including intravenous cefazolin, but can be taken by mouth.[5]