Gather the ingredients.
Bring a large pot of water to a boil over high heat. Add a handful of salt to season the water.
Add the spaghetti to the pot and stir. Cook it according to package directions, stirring frequently, until al dente (to the tooth), which means the pasta is tender but still firm.
Heat the olive oil in a small saucepan over medium heat. Sauté the garlic in the olive oil for about 1 to 2 minutes, stirring frequently, until it is fragrant.
Combine the garlic and oil with the parsley, ¼ teaspoon of salt and the pepper in a serving bowl.
Drain the pasta once it is done. A bit of pasta cooking water should still be clinging to the pasta once it is drained. This will help the sauce form. Immediately toss with the garlic-parsley mixture. Top with cheese and toss again. Serve immediately with more grated cheese , if desired.