Porcupines are not very adventuresome and often use the same dens year after year. Depending on food availability, they may migrate seasonally. They use regular runways through vegetation and snow often leaving a distinct path from their dens to their feeding areas. When approached by predators, the porcupine faces away from its enemy, raises its spines in a threatening gesture, and rapidly lashes out with its barbed tail. The quills of the porcupine are not thrown or shot but easily detached after contact with a predator's flesh.
Porcupines have poor vision but good senses of hearing and smell.
The common porcupine is primarily found in coniferous forests but is also frequently found in deciduous or mixed forests. Highly adaptable, Erethizon dorsatum may be found in open tundra, rangeland, and deserts. When away from forests, the common porcupine usually remains in vegetated riparian areas. Some humans consider the porcupine to be the most important mammalian forestry pest. Individual animals gnaw woodwork, furniture, tools, saddles, and other objects that have received salt deposits from human perspiration.