A question word plus -(으)ㄴ지 makes an embedded question, and 알다 says whether the answer is known. Most of these lines are rhetorical set-ups rather than real questions: 나 지금 뭐 먹고 싶은지 알아? is not asking you to guess, it is announcing that you're about to be told. The other common shape is the penny dropping — 이게 왜 인기가 많은지 알겠다...! (now I see why this is so popular).