Michaela hits me occasionally when she's frustrated (usually across the thighs).
She's a year older so I don't no how this method would work for you but for me I usually ask "does mummy hit you?" "no" "would you like mummy to start hitting you" "no" "you hurt my feelings" "sorry mum". It works for yelling too "does mummy yell at you?" etc etc (although this only works if you don't yell at kids though).
The fact that he laughs at you sometimes when he does it makes it seem like he thinks it's a game and ok behaviour which of course you want to abolish before he has a sibling. Maybe you could make hitting an instant timeout offence. You've warned him previously that hitting is not good so taking it a step further by seperating him from you and his toys for 1 minute when he does it should put an end to it pretty quickly.
Good luck.
ETA: I don't think they "learn" it from anywhere. Kids instinctively lash out when they get really frustrated because they're too little to vocalise their feelings, that's why it's important to teach them to control their emotions and show them acceptable ways to behave. Also if he's doing it for fun he might like the noise it makes and the reaction he gets.
Edited by MrsMojo