Pakistan shut all its schools and land borders on Friday and decided to limit international flights and discourage large gatherings to try to halt the spread of the coronavirus.