Kind of a weird question, but here I go reaponding to it, mainly because hugging in my circle of friends and families is really common, or rather was really common :/
In general:
Hug bros (brothers, my dad, male friends, boyfriends of close friend and family) by both raising the right arm and slingshotting it around anothers back, so the chests bump together. Left arm stays down and no lingering. Usually I only hug bros when I haven't seen them in a while or when I greet larger group of friends and am hugging everyone anyways.
Hug sisters (all of my female family, female friends and aquaintances I am not romantically interested in) in a similar way by wrapping swiftly one arm around them and patting them once or twice. I always hug them when I see them, unless I see them daily (e.g. holidays, living together).
Hug crushes by wrapping both arms around them, crossing arms over/under on each side when you are about the same height, or wrapping your arms over their shoulders and arms when they are smaller than you. Instead of patting on the back, wait for 5 seconds or until they disengage themselves to disengage. If I havent seen someone from the category "sisters" in a long time I hug them the same way.
Hug girlfriends with both arms aswell, but now wrap your arms around her waist and let her wrap her arms around my neck to pull me in and kiss me. Goes without saying that I don't hug anyone else that way, unless it's my crush signalling that she wants a more intimate hug. Ofc, if I am in a casual or more public situation, I would just hug her like I would hug a crush.
I don't hug anyone I don't know or meet for the first time or male aquaintances, unless I am really drunk. Or they wanna hug and engage me, in which case I respond with an awkward hug by going for a 1 pat hug and pulling away my head.