The command-line update isn't subject to timeouts like the web-based version. Move from 1.9.x to 2.x was where I had to switch because the upgrade just took too long. So the basic command to upgrade on the command line after you install the new files is:
php admin/cli/upgrade.php --non-interactive
The assumes there is only one version of php, or that you've configured your environment so that the php command pulls the same version as the web server. In some hosting environments, you'll need to specify the full path to php to get the right version.
The upgrade WILL take a LONG time if you have a reasonable number of students. I'm sure we had less than 100 when I did that upgrade and it still took a long time. The big sticking point is the quiz data. In theory you can skip upgrading that during the upgrade and upgrade it after. I don't recall how to do that if you need to, but I know it's documented somewhere and was in the discussions here quite frequently when I did it about a year after 2.0 was released.