Cardio machines. Boxing classes. Yoga sessions. Indoor pool underwater stationary cycling (yes, that’s really a thing). There are as many ways to work out as there are excuses for staying on the couch. But even though there are lots of options—and lots of science telling us that getting enough physical activity leads to healthier, longer, happier lives—only one in five adults gets enough exercise, according to the Centers for Disease Control.

While there are lots of ways to stay or get fit—long walks, pushups and situps, regular tennis games, taking the stairs instead of the elevator—all require commitment. For those who need an extra push, many wannabe hardbodies decide the social and financial commitment of joining a gym or fitness studio will get them moving.

But if you’re thinking of joining a gym, be aware that the fitness industry thrives on good intentions. Most people who sign on with fitness clubs or studios stop using them after only a few months—and many workout dropouts continue to pay monthly membership fees hoping they’ll soon revive their motivation.

So first make a realistic plan. For most people, beginning a new exercise routine is like quitting a bad habit: the more doable it is (and the more you enjoy spinning/basketball/hot yoga), the more likely you’ll succeed. It also helps if your new exercise regimen includes opportunities to see friends or meet new ones. So does an attractive facility.

Start by setting realistic fitness goals, deciding on types of exercises to achieve them, and committing to a schedule. Make a list of reasons you can refer to when your enthusiasm flags. And if you are older than 40, review your plan with a physician before beginning.

Think about your own motivations and interests—and consider alternatives. Do you need to pay a company big bucks for activities available more cheaply than at a private gym or fitness club?

Many people can get fit for free or cheaply by doing pushups and situps at home, and walking, running, and biking around their neighborhoods. A regular soccer or basketball game at a nearby park is not only cheap but probably more fun than lugging weights around a smelly gym. For a one-time investment of a few hundred dollars, you can buy various types of home exercise equipment.

Local governments offer both facilities and programs. At parks, you can find tennis and basketball courts and sports leagues. YMCAs and some local governments have recreation centers where you can use cardio equipment, weight rooms, and indoor swimming pools, and take exercise classes—all free or much cheaper than comparably equipped private health clubs.

For example, 10 of the city-run Boston Centers for Youth & Family have fitness centers, and 14 have indoor pools. The costs vary by facility, but all are very inexpensive compared to private health clubs. To use the Tobin Community Center, which hosts a variety of cardio and yoga classes, you’ll pay only $25 per year for a family membership. The Mildred Avenue Community Center in the Mattapan neighborhood has a fitness center, indoor pool, and group classes for a $25 annual fee for adults.

Belmont, Brookline, Cambridge, Concord, Dedham, Newton, Sudbury, Quincy, and Waltham also operate pools or recreation centers. For example, Cambridge’s War Memorial Recreation Center has a fitness room, a gymnasium, three indoor pools, and a wide range of group exercise classes. A 48-week pass, with access to all facilities, costs $255 for adult residents ($280 for adult nonresidents) and $95 for senior residents (ages 55 and up). Daily access to all facilities costs $5.75 for adult residents ($6.50 for nonresidents).

Think you’ll eventually join a private health and fitness club? Still spend a few weeks trying the alternatives. It’ll give you a better idea as to whether you’ll stick it out at a gym and which activities and facilities matter to you. Then check out our ratings of area gyms and fitness centers to identify those that offer high-quality facilities and staff at reasonable prices.