The surface of the nematode Caenorhabditis elegans is poorly understood but critical for its interactions with the environment and with pathogens. We show here that six genes (bus-2, bus-4, and bus-12, together with the previously cloned srf-3, bus-8, and bus-17) encode proteins predicted to act in surface glycosylation, thereby affecting disease susceptibility, locomotory competence, and sexual recognition. Mutations in all six genes cause resistance to the bacterial pathogen Microbacterium nematophilum, and most of these mutations also affect bacterial adhesion and biofilm formation by Yersinia species, demonstrating that both infection and biofilm formation depend on interaction with complex surface carbohydrates. A new bacterial interaction, involving locomotory inhibition by a strain of Bacillus pumilus, reveals diversity in the surface properties of these mutants. Another biological property-contact recognition of hermaphrodites by males during mating-was also found to be impaired in mutants of all six genes. An important common feature is that all are expressed most strongly in seam cells, rather than in the main hypodermal syncytium, indicating that seam cells play the major role in secreting surface coat and consequently in determining environmental interactions. To test for possible redundancies in gene action, the 15 double mutants for this set of genes were constructed and examined, but no synthetic phenotypes were observed. Comparison of the six genes shows that each has distinctive properties, suggesting that they do not act in a linear pathway.