Colleges see themselves as natural hotbeds for viral transmission because they host large groups of people who live and work together for long periods.

“The decision to move to virtual instruction was not made lightly,” Lawrence S. Bacow, Harvard’s president, wrote in a letter to the university community, announcing that the school would begin online courses by March 23, after its spring recess.

“Despite our best efforts to bring the university’s resources to bear on this virus, we are still faced with uncertainty — and the considerable unease brought on by uncertainty,” Mr. Bacow wrote. “It will take time for researchers, a good many of them who are our colleagues, to understand enough about this disease to mount a reliable defense against it.”

The list of schools that have announced plans to cancel in-person classes has topped more than two dozen, and higher education officials expect more announcements throughout the week. Among other schools that have announced they will transition to remote instruction are Stanford, Columbia, Princeton, the University of Washington, New York University and Ohio State University. Some have said they will not reopen this semester.

“It isn’t an exaggeration to say that this is the biggest shock to the higher education system in a generation,” said Ted Mitchell, the president of the American Council on Education, which represents presidents and administrators at more than 1,700 colleges, universities and related organizations.