Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a bacteriocin stimulus. A bacteriocin is a protein substance released by certain bacteria that kills but does not lyse closely related strains of bacteria. Specific bacteriocins attach to specific receptors on cell walls and induce specific metabolic block, e.g. cessation of nucleic acid or protein synthesis of oxidative phosphorylation.