Think about whether your child really knows the socially appropriate ways to behave. Your simply telling him is not, by itself, enough. He needs to try, behave inappropriately, try again, and perhaps behave inappropriately again. Like other children, he also sometimes behaves badly even though he knows better. Your goal is successive approximations. This means your child comes closer to what you expect as time goes on. No child always behaves well. Your goal only is for him to act more appropriately more of the time.
Be sure you and others at home are setting good examples of appropriate behavior. Your child likely will not behave any better than others in your family.