Tantrums at this time are common in children, and you have to be aware of this stage of development.
Some children are simply pushing the boundaries of their behaviour, in which case, you push back!
If he is simply throwing himself around at home, and screaming, ignore him. Walk out of the room, but stay in ear shot. Once the attention he is seeking is removed, the reason for the tantrum is removed, and after a few times, he will realise that this is going to be your reaction, and he will stop doing it.
If he tries to hit you, you need to be cxonsistant in your reaction. Crouch down to his level, hold both his hands, hold eye contact, and say "That's NAUGHTY! NO!" and then tell him he has to go and sit on the stairs / in his bedroom for two minutes.
He will of course move straight off the stair, or out of his room, but be firm, and take him back. Each time he tantrums, tell him he must stay for longer, and increase the time by one minute.
When he has calmed down, make him say sorry, and when he has (and not until he has!) give him a love and say you don't like him shouting, it makes you sad, and give him a love. If he behaves nicely after that, praise him often and let him know that this behaviour is appreciated.
If you maintain this regime, the tantrums will stop.
It takes a firm approach, patience, and a determination not to give in. It's a battle of wills - he is the child, you are the adult - who wins dictates your relationship for the rst of his childhood, so get it right now, save grief later.
Children learn acceptable and unacceptable behaviour at this time - and the lessons he learns with you now will carry forward into school, adolescence and even adult life.
Good luck!