MILAN — Last week Donata Zanotti, a 46-year-old photographer and yoga instructor, did something she hadn't done since moving here 20 years ago: She said hello to her neighbor.

This business-oriented city in the northern region of Lombardy has earned its reputation for aloofness, at least by Italian standards. But these days, it’s different. As Lombardy struggles at the epicenter of Italy’s coronavirus outbreak, Milanese are comforting one another, forging new bonds, growing closer — albeit from a distance.

Most Milanese are under what amounts to house arrest. All of Italy has been in lockdown since March 9, but here in the Lombardy region, the quarantine started earlier. Schools closed three weeks ago, and authorities began to shut down theaters, gyms, bars and other gathering places in late February.

The entire region was declared a Red Zone on March 8. People are not allowed to move in or out of it, or even within it, without a permit. But this is no Wuhan, China; the permit is actually a form that anyone can download online. In a typically Italian combination — a love of bureaucracy and an allergy to authority — people issue permits to themselves.

Everyone who can work from home is required to do so; those who can’t may go to their workplaces. Shops are closed, with the exception of supermarkets, groceries, pharmacies and cigarette sellers. People are allowed to shop and take a walk “for the sake of outdoor physical activity,” as the government explains on its website.

Those restrictions now apply to the whole country. The difference in Milan is that the mayor has ordered parks closed since Saturday, to discourage people from jogging and walking around.

“Outdoor activities are allowed on paper, but where is one supposed to go?” asked Andrea Paracchino, a 32-year-old working in visual effects who has been confined for four days to the apartment he shares with a roommate.

“At least we get along,” he said. “I couldn’t imagine going through this with a bad roommate.”

Paracchino’s parents live in the neighboring region of Piedmont, but he decided not to go there during the lockdown.

“That would be irresponsible,” he said. “What if I have the disease without showing symptoms? I am not worried about myself. I am worried for others.”

Elsewhere in Italy, the quarantine is still somewhat preemptive. But Lombardy is in the throes of a full-fledged outbreak. The region has recorded more than half of Italy’s coronavirus cases and the vast majority of its deaths.

Zanotti, the photographer, wakes up each morning at 6 and takes a walk while the city is mostly asleep, to avoid bumping into people. “I need air,” she said, “or I’ll go mad.” She has taken up the habit of stepping out onto her balcony and chatting with her neighbors who do the same.

She’s also posting long-distance portraits of her neighbors on Instagram and participating in group meditation sessions online.

“In this moment of collective trauma, one needs to savor every little moment of beauty,” she said. The architecture of Milan — homes tend to be built around shared courtyards — helps. “People are rediscovering the courtyard as a common space,” Zanotti said. “There’s this sense of unity, which came unexpected.”

Community singalongs have erupted spontaneously from windows in Milan and other Italian cities.

But while hardship seems to have instilled a new sense of camaraderie, conditions are getting harder every day.

Orders have overwhelmed online food shopping. Anna Zafesova, a 50-year-old writer and translator who has avoided outside contact for a week to protect her 66-year-old husband, said she spent hours one day trying to place an order. When she succeeded, she was told to expect delivery in 17 days. “It’s not like we’ll starve,” she said. “But getting some fresh stuff or goodies to cheer you up has become a real challenge.”

The lockdown has proved particularly burdensome for parents who have to juggle working from home with child care. “I am exhausted,” said Serena Cima, a biologist and mother of a 15-month-old. Cima, 40, has been working from home for weeks. “People say that quarantine is an occasion to take a moment for yourself, but I have been in a nonstop routine for weeks.”

Many families are reluctant to hire babysitters, to avoid contact with the outside, but Cima found a babysitter in the neighborhood who can visit for a couple of hours each day without taking public transportation. “I am lucky, but it’s economically straining.” Authorities have suspended the fees for public child care, but because her son attends a private school, they still have to pay.

Some wonder how long the city can sustain such a lockdown. “I am very worried,” Zafesova said. “Now we are sticking together and singing the national anthem from our windows. But eventually people will start getting nervous.”