Quick answer
The regular prepositional ending is -е: в до́ме. These nouns take a stressed -у́ after в and на: в шкафу́.
The list worth learning
| Noun | Location form | Meaning |
|---|---|---|
| шкаф | в шкафу́ | in the wardrobe |
| пол | на полу́ | on the floor |
| лес | в лесу́ | in the forest |
| сад | в саду́ | in the garden |
| у́гол | в углу́ | in the corner |
| бе́рег | на берегу́ | on the shore |
| мост | на мосту́ | on the bridge |
| аэропо́рт | в аэропорту́ | at the airport |
| год | в году́ | in the year |
| Крым | в Крыму́ | in Crimea |
Add на краю́ (on the edge), в ряду́ (in the row), на ветру́ (in the wind), в порту́ (in the port). That covers nearly everything you will meet.
Only after в and на
The -у́ form appears only with the two location prepositions. After о (about) the same nouns behave normally: в лесу́ but о ле́се; в саду́ but о са́де. Some grammars treat the -у́ form as a separate locative case for exactly this reason.
Just learn them as phrases
There is no rule to derive these from, and the list is short. The efficient approach is to store them as fixed phrases with their preposition attached — в шкафу́, на полу́, в лесу́, в саду́, в углу́, в году́ — the same way you learn на по́чте rather than reasoning about it.
в году́ is unavoidable
Of the whole list, в году́ is the one you cannot dodge: every date with a year uses it. В две ты́сячи двадца́том году́ — never в го́де.
Typical mistakes
в шка́фе
в шкафу́
шкаф belongs to the -у́ group.
в э́том го́де
в э́том году́
год always takes -у́ after в.
Check yourself
Which is correct?