![]() 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. The first thing we’ll talk about is shutting down your computer. 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. Unless you’ve recently performed an action as the administrator, you’ll be asked for your password. Once you successfully enter it, your computer will immediately start the shutdown procedure. Using this command basically gives your computer the option to either halt or poweroff, then does that immediately. Halting simply stops all running processes, making it safe to turn off your computer, while the poweroff command does both. Note: if you want to halt, you can also type sudo halt into the Terminal. Then click on Run as administrator to open it with admin rights. Open the Start menu and type in Command Prompt in the search box. With the Command Prompt, you can shut down or restart your Windows 10 PC with a timer or by displaying a custom message. If you would like to ensure that your system halts or poweroffs by default, the following commands do just that. Shutdown/Restart Your PC With Command Prompt. In either instance, the time at the end is necessary. Typing either sudo shutdown -P or sudo shutdown -H without the time will bring up a message informing you that the time is necessary. What if you want a bit more control? The shutdown command has many options. For instance, if you want to shutdown your computer in 30 minutes, then sudo shutdown +30 would be the command. 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. 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 restart your computer, you have two options. The first still uses the shutdown command, but adds an option at the end that tells your system to restart once the shutdown has completed successfully.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |