Linus made an enormous impact, certainly. He'd have had an even bigger impact if he was less of a caustic dick.
And before you say that there's a tradeoff involved and that genius technical people are just that way, look up Berkson's paradox.
I learned long ago that no matter how good they are, it's not worth it.
If you totally ban profanity or vulgarity, all you do is force other words to take up the slack of what people use those words for, and therefore increase ambiguity.
Don't lazily add profanity to the code base because you are a child (ie no, don't use "fuck1" as a variable name FFS) but if there is something truly insane going on, I'm going to write "This is fucking magic" in the code, and my coworkers will know to give that code the respect it deserves.
Consider the fast inverse square root code. Most people only know it because "what the fuck" in a comment. Intensifiers are useful in communication.
https://tvtropes.org/pmwiki/pmwiki.php/Main/PrecisionFStrike
Your code SHOULD have few swears because few situations deserve an intensifier like that, but some situations absolutely call for it.
This is so weird to me. You won't find blueprints (at least not the copies that will be handed around across teams and companies) marked up with "this is fucking magic" when an architect or structural engineer design something amazing. In a DM/email/SMS? Sure, that's the correct place to put that message.
The idea that removing vulgarity will increase ambiguity in this context is very strange. In terms of communication, the only use for vulgarity is to convey emotion. That's not relevant here. If we ban it, maybe people will explain why something is shit, instead of just saying it's shit. Forcing other words to take up the slack is a feature, not a bug.
I know about the fast inverse square root code. I could probably give a decent if somewhat vague overview of how it works from memory. I don't recall the WTF comment, and that certainly isn't why I heard about it.
This is a great example of what I'm saying. Commenting 0x5f3759df "what the fuck?" isn't useful. It tells me the author was confused or amazed or something. Imagine if instead they had commented, "Compute an initial guess by negating and halving the exponent. 0x5f3759df was found by experimenting and seems to give a good guess in the mantissa bits."
Otherwise we wouldn't have the Linux kernel; and I bet the swearing guy behind it got more stuff done and made a bigger difference than the combination of the most effective programmers you have ever met.