I once had someone ask me what "what's up" meant ("sup" is the shortened version). It's a slang and actually has the same meaning as "how's it going," " what's going on," and "what's happening."
Most of the examples above are very casual ways to say hi. We use it with people we already know like our friends or family members. I would most definitely not use "sup" with my boss or teacher.
You can, however, use "good morning/afternoon/ evening" and "hello, how are you?" in more formal settings.
Try to use a different way of saying hi!