ㄹ/을지
whether to (future); future + uncertain
Explanation
ㄹ/을지 is an indirect-question ending. It puts a question about a possible action or choice inside a larger sentence: what to do, where to go, or whether to do it.
Say what you need to decide
Use a question word such as 뭐, then the verb with ㄹ/을지. The rest of the sentence says what you decide, think about, or don’t know.
Consider whether to do something
Without a question word, the embedded question can mean whether to do the action.
Choose the ending
Use ㄹ지 after a vowel (가다 → 갈지) and 을지 after a consonant (먹다 → 먹을지). If the stem ends in ㄹ, keep it and add 지: 살다 → 살지.
The uncertainty can be about something outside your control, too. In this case you’re wondering what will happen; you aren’t making a decision.