Catalyzes the acylation of sphingoid bases to form ceramides. Sphingolipids from Caenorhabditis elegans contain exclusively isosphingoid bases. Exhibits substrate preference for fatty acyl-coA chains containing 20 to 22 carbons. Required for adaptation of the nematode to anoxia. Anoxia tolerance may require one or more of the ceramide species that are either specifically or preferentially synthesized by HYL-2, and seems to be affected by a pathway that is parallel to that involving daf-2. a fatty acyl-CoA + sphing-4-enine = an N-acylsphing-4-enine + CoA + H(+) docosanoyl-CoA + sphinganine = CoA + H(+) + N-docosanoylsphinganine sphinganine + tetradecanoyl-CoA = CoA + H(+) + N-(tetradecanoyl)-sphinganine eicosanoyl-CoA + sphinganine = CoA + H(+) + N-eicosanoylsphinganine 15-methylhexadecasphinganine + a fatty acyl-CoA = CoA + H(+) + N-acyl-15-methylhexadecasphinganine Lipid metabolism; sphingolipid metabolism. Strong expression in the gut, the posterior bulb of the pharynx, the hypoderm, and unidentified cells of the head and the tail. Animals deficient in HYL-2 show inability to adapt to oxygen deprivation as a result from the loss of ceramide synthase function. Belongs to the sphingosine N-acyltransferase family.