As other college students head out to party on a Saturday night, Julie Linneman, a sophomore at Villanova University, rides the subway to a small rowhouse in West Philadelphia to meet with “her people,” a posse of students who understand what it’s like to be taken down by opioids.

Ms. Linneman is a bespectacled 22-year-old who favors shredded jeans. She is a fan of cooking shows, fantasy fiction and Paul McCartney. She spent her first attempt at sophomore year — the one at Northern Kentucky University — in her dorm room, high on heroin.

Coming to terms with a habit that nearly killed her, she has found support at the Haven at Drexel, Drexel University’s housing for students in recovery. Seven students from colleges in the Philadelphia area — including the University of Pennsylvania, Temple and Villanova — live, eat and socialize here, where they can abstain without temptation.

More converge during these Saturday night meetings. “Sometimes you just need to be around other students who know what you have gone through,” Ms. Linneman said. They share snacks, drink water instead of beer, and talk about their life-threatening addictions.

Ms. Linneman, who agreed to be named because she hopes to pursue a career in recovery advocacy, got her first pills — Vyvanse and Adderall, stimulants for attention deficit hyperactivity disorder — in high school from the boy with the locker next to hers. She soon moved on to prescription painkillers like Percocet. The “warm blanket” effect alleviated debilitating anxiety and loneliness.

Once at college, she replaced pills with bags of cheap heroin. Her roommate moved out. The drug rendered her friendless. “It was one of the most lonely times of my life,” she recalled. She grew thin and pale. She would sit in the cafeteria alone, barely eating, occasionally nodding off. The workers would ask, “Are you O.K.?”

She still managed to get decent grades and to keep her addiction hidden at her job. By the end of the semester, Ms. Linneman’s father knew something was wrong. Over winter break, he gathered her sister and brother for an uncomfortable intervention. She wasn’t ready to seek help and went back to school. She began skipping classes and eventually dropped out. Then she was ready.

 
 

Nasty withdrawal symptoms make stopping doubly hard. She spent four and a half months in a New Jersey rehabilitation center before joining the Haven, first as a resident, now as a frequent visitor. She has been clean for a year and a half.

The opioid epidemic has ravaged communities around the nation — deaths from overdoses now outnumber deaths from car crashes — prompting President Trump to establish a federal task force and, on Thursday, to declare a public health emergency, allowing some grant money to be released to combat the problem and some laws and regulations to be eased. The task force is to issue a plan of action this week.

Already on campuses, recovery programs are expanding and multiplying, populated by students who have struggled with dependence on Percocet (oxycodone) and Vicodin (hydrocodone), as well as those who have moved on to fentanyl and heroin, which are far cheaper on the street than prescription pills.

Little data exist on the extent of the problem among college students. But according to a 2016 national survey of them by the University of Michigan, 7 percent of 870 respondents said they had misused opioid painkillers; 4 percent had done so in the previous year. For 19- to 22-year-olds who hadn’t gone to college or had dropped out, which is common when struggling with addiction, close to 13 percent said they had misused painkillers.

 
 

Sean Esteban McCabe, a Michigan researcher who has studied student addiction for close to 20 years, said misuse is most prevalent on competitive campuses, where students are more affluent and have better access to prescribed pills. Studies have indicated that athletes in high-contact sports like ice hockey and wrestling, who are often prescribed painkillers, are particularly vulnerable. Campus users, Dr. McCabe said, tend to be white, live in fraternity or sorority houses, and have lower grade-point averages.

Thanks to better prevention education and treatment, heroin use among college students has flattened out, and abuse of painkillers seems to be dropping. A decade ago, 9 percent in the Michigan survey said they had misused within the previous year.

This news has not heartened advocates, though, largely because the number of deaths has actually risen. Public health officials blame a black market flooded with more dangerous options like fentanyl, a highly addictive synthetic that is 100 times more potent than morphine. It is the opioid that killed Prince.

Opioid-related deaths among Americans age 24 and under almost doubled from 2005 to 2015, when 3,165 were reported, according to the Kaiser Family Foundation, based on data from the Centers for Disease Control and Prevention. The number of opioid-related emergency room visits by young people also nearly doubled over five years, from 52 per 100,000 patients to 97 in 2014, according to the United States Department of Health and Human Services.

 
 

Last May, four students at Johns Hopkins University were hospitalized after overdosing on opioids during a late-night fraternity party. Furman University in Greenville, S.C., lost a student a day before his graduation last spring when he overdosed on fentanyl. A sophomore at the University of North Carolina at Chapel Hill, who had just spent the weekend with his mother at a Tar Heel football game, was found dead in his bedroom. In his system were traces of the opioids he had tried desperately to kick.

States have urged colleges to take action. New York and Colorado are earmarking millions of dollars to their public colleges for prevention education and research. Maryland now requires colleges and universities to offer arriving students a drug-prevention class that focuses on the risks of opioid use. Gov. Chris Christie of New Jersey, who heads the federal addiction task force, announced this year a $1 million increase for recovery dorms on public campuses in his state.

It is not uncommon for stores near campuses, health centers and dorms to stock free overdose reversal kits of naloxone. And the return to school now includes a bustle of overdose-prevention training sessions for residence hall assistants, campus police officers and health care workers.

Last year, West Virginia University, in a state that leads the nation in fatal drug overdoses, started a parent support group. Mothers and fathers of young users gather monthly, some calling in remotely, to tell stories of spoons going missing from kitchen cutlery drawers and students calling home, desperate for money, dropping out of classes or getting arrested. Sometimes the parents cry uncontrollably.

Prescription pills are part of the party mix. Xanax, a highly addictive anxiety drug, has become a popular accompaniment to beer and vodka shots. Adderall is crushed for snorting. And Vicodin is ingested as a relaxant, available from students with prescriptions or on an online black market.

 
 

Dr. Joseph Lee, medical director for youth services at the Hazelden Betty Ford Foundation, says that students act as mixologists, creating dangerous drug and alcohol cocktails for themselves and friends. “They are alarmingly familiar with what they can do to get high, but not the danger,” he said, “and they don’t know where to get help.”

Students in recovery confirm this. Many of them say that in high school and college they were purposeful about their drug use, smoking pot to calm down and taking stimulants to speed up. The technique worked well, until overuse and mixed use began to alter the impact. Drugs that were supposed to do one thing did another.

Bart Arconti, a junior at the University of North Carolina at Chapel Hill, got hooked on prescription painkillers in the basement of his best friend’s townhouse in a Baltimore suburb. He was 17. His friend had bought hydrocodone from a neighbor. They crushed a pill on the washing machine lid and snorted it. It became his favorite high.

 
 

Mr. Arconti hopes his story might inspire others to get help. He stopped taking opioids four and a half years ago after several stints in rehabilitation. He says users destined to become addicts generally experiment until they find the drug they want. “There is a lot to choose from,” he said.

It should not be a surprise that today’s 20-somethings have developed a taste for prescription pill cocktails. Pills are ubiquitous in homes, schools and offices. The National Survey on Drug Use and Health in 2015 found that 119 million Americans, 12 and older, take prescription painkillers, tranquilizers, sedatives or, increasingly among children and young adults, stimulants like Adderall. That’s nearly half the population.

Painkillers in particular have surged. The sale of opioids quadrupled between 1999 and 2010, according to the American Society of Addiction Medicine. By 2012, doctors were writing 259 million opioid prescriptions a year, enough for every American adult to have his or her own bottle. The National Institute on Drug Abuse has been encouraging doctors to reduce the number of addictive pills they hand out. Parents are being told to dispose of unused painkillers, and drug companies are producing opioids in gel forms, so they can’t be crushed to snort.

Dr. Andrew Kolodny, the co-director of Opioid Policy Research at Brandeis University’s Heller School for Social Policy and Management, describes the drug surge as “a pill-for-everything culture,” which he says has significantly affected how young people feel about prescription pills when they go off to college. Multiple studies have shown that the more available pills are to young people, the more likely they are to use them.

 
 

“Today, if you grow up in a home where pills are used for every little problem,” he said, “you are likely to leave for college with a lot less fear about them.”

Throughout October, a wall of painted sneakers has greeted visitors to the University of North Carolina’s student union. It’s part of an exhibit entitled “Step Into the Soles of Recovery,” sponsored by the university’s four-year-old recovery program. Alongside the shoes are the personal accounts of the students who decorated them. The laces of one sneaker are wrapped tightly around it. On a piece of paper nearby, the student wrote: “For me, addiction always felt suffocating.”

Frank Allison used heroin and drank heavily until he was 40; now 51, he heads the U.N.C. recovery program. He said the exhibit was a way for some of the four-dozen students in his program to talk candidly with the campus about their struggles, part of a push to destigmatize addiction and shift attitudes about treatment.

Mr. Allison wants to see a move away from a “moral model” that treats students with substance issues like failures with no self-control instead of like people with a chronic illness, which is how the American Society of Addiction Medicine defines it. Physicians believe that this viewpoint will help frame the opioid problem for parents and educators, and help funnel recovery and prevention funds onto campuses.

U.N.C. offers a cadre of services that largely depend on where students are in their recovery — six months substance-free or 60 months substance-free. Two years ago, Mr. Allison persuaded administrators to offer beds on a drug- and alcohol-free dorm floor. Three of his students currently live there. Some choose to be closely monitored, through breathalyzers and urine tests. The university helps them find therapists and coaches who accompany them to multiple recovery meetings a week. Others have chosen more autonomy but attend Mr. Allison’s workshops on meditation, mindfulness and balanced living.

Like others in the movement, he refers to addiction as a “substance use disorder” and refuses to use the word “failure” when referring to relapses.

“People don’t misuse substances because they are bad people,” he said. “I wasn’t a bad person. I was a sick person. Having a substance use disorder is like having diabetes or a heart condition.”

Mr. Arconti, now 26 and pursuing a degree in Asian studies, says that Mr. Allison’s vision is reflected in the recovery community. The group, mostly male, consists of former frat boys, rock climbers and hip-hop fans, many not yet of legal drinking age. While some arrived in the program after too much dorm-room pot smoking, Mr. Arconti’s addiction lasted years. At the height of it, he made frequent “runs” to a drug-infested neighborhood in West Baltimore. Some of his friends have since died. Others are in jail. That was before he woke up one morning in a seedy hotel room and decided his body was spent. He committed to stopping.

When there are U.N.C. basketball games Mr. Arconti watches with his recovery friends. Together, they go to Durham Bulls games and amusement parks. But it is at weekly meetings where the recovery ethos shines. Students talk about sober dating, relapse temptations and struggles to make time for studying and recovery. When they speak specifically about their addictions, they are quick to play down the drugs they gravitated toward. Instead, they focus on the illness they share, and the future.

During a recent meeting, when it was his turn to talk, Mr. Arconti said: “I’m happy to be here. I’m mentally and spiritually feeling well.”

Nationally, more students are seeking treatment. Last year, about one in two patients at the Minnesota youth treatment center of the Hazelden Betty Ford Foundation were being treated for opioid addiction. In 2010, one in six were. And the number of opioid-related claims for coverage by Blue Cross Blue Shield has almost doubled since 2010 for college-age patients.

The Haven at Drexel is part of a network called the Haven at College, which started in 2012 with one residence, at the University of Southern California, where young people could bond over a common struggle. Now there are five — four on or near California campuses and the one at Drexel — housing more than 50 young adults.

The umbrella organization is run by two former users — alcohol and heroin were their drugs of choice. The cost is $1,900 to $3,800 a month, which can be defrayed by financial aid, alumni funds earmarked for recovery and Haven work-study. Students who live in the houses receive meals, coaching from a licensed clinician and support from a house manager who monitors their whereabouts. There are curfews for newcomers, penalties for missing them and chores for everyone.

But mostly, students say, there is camaraderie.

Most of the houses are near dorms or fraternity houses, in what Holly Sherman, a founder and the executive director, calls the “war zone of party central.” Still, or perhaps because of this, it is not uncommon to have dozens of people show up for the Saturday night meeting.

Ms. Sherman says students arrive on campus and wonder: “‘How am I going to stay sober if I can’t find a sober community?’ What we do is work with the university to establish that community for them.”

Matthew, a 24-year-old former varsity athlete, sometimes attends the meetings. A May graduate of Albright College in Reading, Pa., he asked that his last name not be used because he wants to work as a financial adviser or analyst at a Fortune 500 company. But the opioid obsession he developed in college is getting in the way. He hopes the experiences of other students, many of whom know well the allure of opioids but have managed to kick the habit, will rub off on him.

He was handed a “Perc” freshman year by an older teammate he looked up to. At the time, he was at a small Catholic college in a Philadelphia suburb. “I’m in college,” he recalled thinking. “Let’s experiment, let’s party. He’s cool. I want to be cool.”

Soon after, a dealer introduced him to heroin. He began snorting before class, while doing homework and instead of going to parties and drinking. The heroin made all the drudgeries — homework, dining hall food, boring classes — seem manageable. “During Accounting 101, I’m in the bathroom snorting heroin, thinking: ‘I’ve got to get back to class.’”

When he transferred to Albright College, he dialed back on the heroin and returned to Percocet. Last summer, shortly after graduating, he went to a rehabilitation center in Florida.

“I’m not ready to just throw my life away for a stupid blue pill,” he said, perched on a weathered coach in the recovery center living room. Still, he acknowledged, he struggles to kick the habit. “I don’t want to do this for the rest of my life. I’ve got really big goals.”