Plays a role in peptidoglycan recycling by cleaving the terminal beta-1,4-linked N-acetylglucosamine (GlcNAc) from peptide-linked peptidoglycan fragments, giving rise to free GlcNAc, anhydro-N-acetylmuramic acid and anhydro-N-acetylmuramic acid-linked peptides (By similarity). Hydrolyzes rapidly p-nitrophenyl-N-acetyl-beta-D-glucosaminide (PNP-beta-GlcNAc) and 4-methylumbelliferyl-beta-GlcNAc, and slightly active on p-nitrophenyl-beta-GalNAc. May play a role in signal transduction between host and organism. Hydrolysis of terminal non-reducing N-acetyl-D-hexosamine residues in N-acetyl-beta-D-hexosaminides. Inhibited by GlcNAc, 2-acetamido-1-N-(4-L-aspartyl)-2-deoxy-beta-D-glucopyranosylamine (GlcNAc-Asn) and O-(2-acetamido-2-deoxy-D-glucopyranosylidene)-amino-N-phenylcarbamate (PUGNAc). Optimum pH is 7.0. Optimum temperature is 45 degrees Celsius. Cell wall biogenesis; peptidoglycan recycling. Monomer. Belongs to the glycosyl hydrolase 3 family. NagZ subfamily.