어떻게 지내세요?, 안녕하셨습니까?, 안녕하세요?, etc.
- 안녕하세요: means "How are you?" to someone you already met, "Nice to meet you" on a first time encounter.
- 안녕하셨어요?: Literally "Have you been well?". Not appropriate when meeting someone for the first time.
- 안녕하셨습니까?: more formal version of 안녕하셨어요? (see the ending forms below).
- 어떻게 지내세요?: 어떻게(How) + 지내다(live; fare) + 시 (honorific fix) + (어)요(politeness fix). "How are you doing?".
* 안녕 means "well", "free of trouble". 안녕하다 is therefore "am/are/is well", and 안녕하세요? "Are you well?".
* Four common ending forms, based on formality(stiff or smooth), and politeness(respectful or familiar).
"하다":
-- 합니다 (formal-polite)
-- 한다 (formal-casual) or 하다. * 한다 is used for action, 하다 for state. (for 안녕, 안녕하다 is the right form).
-- 해요 (informal-polite)
-- 해 (informal-casual).
"하시다": honorific "시" adds politeness to the word itsel
-- 하십니다 (f-p)
-- 하신다 or 하시다 (f-c) * "안녕하시다" is the correct form since it is a "state" for being.
-- 하세요 (i-p)
-- 하셔(i-c).
- 안녕하다 => 안녕합니다(f-p) / 안녕하다(f-c) / 안녕해요(i-p) / 안녕해(i-c).
- Question form => 안녕합니까? / 안녕한가? / 안녕해요? / 안녕해?
- 안녕하시다 => 안녕하십니다 / 안녕하시다 / 안녕하세요 / 안녕하셔.
- Question form => 안녕하십니까? / 안녕하신가?/ 안녕하세요? / 안녕하셔?.
Only some of these forms are widely used: 안녕하세요?, 안녕하십니까?, 안녕하셨어요?, 안녕하셨습니까?.
And 어떻게 지내세요?, 어떻게 지내십니까? 어떻게 지내셨어요?, 어떻게 지내셨습니까?, 어떻게 지내? 어떻게 지냈어?.
You can also substitute 잘 for 어떻게, to change the meaning to "Have you been doing well?", etc.