Right-side 阝 is the city radical 邑, marking words about settlements and inhabited places — neighbors live in adjacent dwellings. Same radical appears in 都, 邦, 郊, 部. Don't confuse with left-side 阝 (mound, from 阜) which has different semantics.
令 supplies the rhyme — lìng → lín — and was originally read líng in this compound, matching the modern pronunciation. The same phonetic series produces 铃, 龄, 玲, 怜 (in some readings), all sharing this -ing/-in nasal ending.