If you were using OS X, there's the "caffeinate" command you could use.