The gastrointestinal tracts of developed animals are colonized by an extremely complex and diverse microbial ecosystem. The host and its microbiota are in close interaction with each other, and the host's genetic characteristics have been suggested to have an influence on the composition of fecal bacteria. However, different sections of gastrointestinal tract harbor microbes typical of each particular section and knowledge of the effect of the host's genotype on the microbiota in the different parts of the gastrointestinal tract is limited. In this study, mice from two inbred strains, C57BL/6J and BALB/c, were raised in identical conditions. Bacterial samples were collected from four parts of the gastrointestinal tract and analyzed for bacterial fatty acids using gas-liquid chromatography (GLC). Significant differences between the microbiota in the feces, in the cecum, in the small bowel and in the stomach were observed. Cecal samples produced more diverse bacterial fatty acid profiles than any of the other samples, revealing a higher bacterial density and a higher number of bacterial species. Further, a significant difference between the two strains of mice was observed throughout the gastrointestinal tract. These findings indicate that the host's genotype has an influence on the gastrointestinal microbiota as a whole, and provide further evidence that the cecum is the most species-rich region of the murine gut.