You don't have to be dating someone to give them a good, warm hug. However, with guys you aren't romantically involved with, you generally need to give him a little heads up. Make eye contact, smile, and open your arms up. Unless he firmly sticks his hand out for a shake or seems to shy away/avoid eye contact, just move into the hug. Be flexible -- if he doesn't seem to want a hug, don't hug him. If he does, or you're unsure, just be yourself and do whatever you want. Very few guys will complain about a casual hug. You'll end up close enough that you can comfortably get your arms around each other and touch chests. In general, your feet will be 6-8" away from each other, but don't worry about it too much. It is a casual hug, so just be casual about it. Unless you're pressing your entire body into his and pulling him in close, you're not going to send the wrong signal.  Open your arms as wide as you feel. You can feel free to open your arms wide if you want a big hug. If he doesn't seem like he wants a hug, you could give him a side hug. Move so you are side by side with him, and put your arm around his shoulder. This one-armed hug can get you out of many awkward moments if need be. Just make sure your head is going the opposite way of his head and you'll be fine. If you're the taller one, let him slide his arms under yours. This isn't a hard and fast rule, of course, but in general it is easier to slide into a hug if you don't have to reach down to get under someone's armpits. Once your arms are positioned in response to his, move them all the way around his body and gently but firmly embrace. Keep your body relaxed while you are putting your arms around his body. Your hands can be open and touch his back or shoulders, or you can clasp your own hands behind him.  Don't think about yourself too much while hugging. This can make you feel awkward. Instead, concentrate on the guy you are hugging and try to enjoy the moment. Just laugh if anything goes wrong or feels awkward. Hugs are not complex signals or mating...

TL;DR in Vietnamese:
Giao tiếp bằng mắt và mở rộng vòng tay trước khi bắt đầu tiến lại. Mở rộng vòng tay và bước đến gần đối phương. Trượt tay của bạn bên dưới tay của anh ấy nếu đối phương cao hơn bạn. Vòng tay quanh lưng anh ấy. Tốt nhất bạn nên ôm trong 2-3 giây. Bước lùi lại, giao tiếp bằng mắt và mỉm cười.