Ammonia, a key factor in the pathogenesis of hepatic encephalopathy (HE), is predominantly derived from urea breakdown by urease producing large intestinal bacteria and from small intestine and kidneys, where the enzyme glutaminases releases ammonia from circulating glutamine. Non-culture techniques like pyrosequencing of bacterial 16S ribosomal ribonucleic acid are used to characterize fecal microbiota. Fecal microbiota in patients with cirrhosis have been shown to alter with increasing Child-Turcotte-Pugh (CTP) and Model for End stage Liver Disease (MELD) scores, and with development of covert or overt HE. Cirrhosis dysbiosis ratio (CDR), the ratio of autochthonous/good bacteria (e.g. Lachnospiraceae, Ruminococcaceae and Clostridiales) to non-autochthonous/pathogenic bacteria (e.g. Enterobacteriaceae and Streptococcaceae), is significantly higher in controls and patients with compensated cirrhosis than patients with decompensated cirrhosis. Although their stool microbiota do not differ, sigmoid colonic mucosal microbiota in liver cirrhosis patients with and without HE, are different. Linkage of pathogenic colonic mucosal bacteria with poor cognition and inflammation suggests that important processes at the mucosal interface, such as bacterial translocation and immune dysfunction, are involved in the pathogenesis of HE. Fecal microbiome composition does not change significantly when HE is treated with lactulose or when HE recurs after lactulose withdrawal. Despite improving cognition and endotoxemia as well as shifting positive correlation of pathogenic bacteria with metabolites, linked to ammonia, aromatic amino acids and oxidative stress, to a negative correlation, rifaximin changes gut microbiome composition only modestly. These observations suggest that the beneficial effects of lactulose and rifaximin could be associated with a change in microbial metabolic function as well as an improvement in dysbiosis.