गामं च णयरं च, रण्णं च गिरिकंदरं।
Village and city, forest and mountain cave.
Mahavira opens Chapter 14 with a simple list that contains an entire philosophy of practice. Village and city represent the full complexity of human social life — relationships, obligations, commerce, gossip, family bonds, the pull of comfort, the push of conflict. Forest and mountain cave represent the solitary environments that the monastic tradition often sees as the proper place for serious practice, away from distraction and temptation. Most religious traditions create a hierarchy here: the cave is better for practice; the village is a compromise. Mahavira makes no such hierarchy. The wandering monk moves through all four environments, and the same practice is required in all of them. The quality of the monk's equanimity is not protected by keeping him in conducive environments — it is tested and proven by moving him through all environments. A practice that can only survive in favorable conditions is not yet mature. The four environments in this opening verse are therefore not a description of where the monk goes; they are a description of what the practice must be strong enough to hold.
The simple version: The monk's equanimity must hold in every environment. If it only works in peaceful solitude, it is not yet real equanimity.