While guinea pigs can thrive well as indoor pets, they are much happier when housed in an outdoor environment. They need enough space for their living quarters and an outdoor run that is secure so they will be able to graze anytime they want to. Grazing provides a lot of stimulation; it also helps keep their teeth well-worn down and in tip-top condition.
If you want to place a male and female cavy in the same enclosure, make sure that the male has been neutered so you won’t be dealing with unplanned and unwanted pregnancies. Another thing that you should take note of—it will take about 4 weeks after being neutered for male guinea pigs to become sterile. So make sure they are kept apart during this time.
Guinea pigs that are kept outdoors tend to live much longer, but care and attention must be made to ensure that the hutch is very secure, with lots of nooks and crannies to explore and hide away in. Guinea pigs like to take a nap in a nice quiet spot.
Your veterinarian can further enlighten you on the housing needs of guinea pigs.