In a large pot, bring 3 quarts water to a boil. Add the pasta and 2 teaspoons salt, then cook, stirring occasionally, until just shy of al dente. Reserve about 1½ cups of the pasta cooking water, then drain.
Meanwhile, in a 12-inch skillet over medium-high, heat the oil until shimmering. Add the onions and ½ teaspoon salt; cook, stirring only occasionally at the start then more often as the onions brown, until crisped and deeply caramelized, about 15 minutes; reduce the heat as needed to prevent scorching. Stir in the anchovies, vinegar and ¾ teaspoon pepper, then add the pasta and 1 cup reserved pasta water. Cook over medium, stirring and tossing, until the pasta is al dente, about 3 minutes.
Off heat, stir in the chives. Taste and season with salt and pepper. Serve sprinkled with the cheese.
