If you want to restart your computer, you have two options. Note: all commands which demand a time use 24-hour time, even if your clock is set to 12-hour time, so sudo shutdown 5:30 would be 5:30 AM.įinally, if you’ve used one of these examples with a time attached, and realize you want to keep using your computer, typing sudo shutdown -c in a different Terminal session will cancel the scheduled shutdown. If you want to shutdown your computer at 5:30 PM (as an example), then sudo shutdown 17:30 would be the command to use. For instance, if you want to shutdown your computer in 30 minutes, then sudo shutdown +30 would be the command. What if you want a bit more control? The shutdown command has many options. Typing either sudo shutdown -P or sudo shutdown -H without the time will bring up a message informing you that the time is necessary. In either instance, the time at the end is necessary. If you would like to ensure that your system halts or poweroffs by default, the following commands do just that. Note: if you want to halt, you can also type sudo halt into the Terminal. Halting simply stops all running processes, making it safe to turn off your computer, while the poweroff command does both. Using this command basically gives your computer the option to either halt or poweroff, then does that immediately. Once you successfully enter it, your computer will immediately start the shutdown procedure. Unless you’ve recently performed an action as the administrator, you’ll be asked for your password. At its most basic, we can shutdown our computer by typing the following into Terminal: sudo shutdown -h now We’ll do this using the shutdown command. The first thing we’ll talk about is shutting down your computer. Before we get to the commands, take note that many of the things we’ll do will immediately end your current session, so it’s a good idea to have everything saved while browsing this tutorial, so if – by chance – you mistakenly turn off your computer, you won’t lose anything.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |