Core component of nucleosome. Nucleosomes wrap and compact DNA into chromatin, limiting DNA accessibility to the cellular machineries which require DNA as a template. Histones thereby play a central role in transcription regulation, DNA repair, DNA replication and chromosomal stability. DNA accessibility is regulated via a complex set of post-translational modifications of histones, also called histone code, and nucleosome remodeling. Has broad antibacterial activity. May contribute to the formation of the functional antimicrobial barrier of the colonic epithelium, and to the bactericidal activity of amniotic fluid. This is the function of H2BC6 (H2B clustered histone 6, ENSG00000274290).