sudo shutdown -P 300
Firstly, you need to have root access to use shutdown, hence my use of the sudo command. I used -P to indicate that I want to power off after shutdown (as opposed to rebooting, or 'halting'). Finally, I typed 300 to indicate that I want the computer to shutdown in 3.5 hours (300 minutes).
Another way you can use the command is by specifying the clock time at which you want your computer to shutdown in 24 hour format. So let's say you want your computer to shut down at 4:15pm:
sudo shutdown -P 16:15
Type that in and your computer will shut down at 4:15pm. That's it!