One day, you’ll want to keep your Mac up with you. Give it some caffeine with the “caffeinate” command.
What’s “caffeinate” do?
Open up Terminal or iTerm 2 and check out the man pages:
How would I use it?
Just type in:
and your Mac will stay awake until you press Control + C to stop the command.
If you’d like, a timer to automatically shut it off is available.
Remember the “120” above is in seconds. In the above example, it would stay up for two minutes.