macos – Shutdown mac with keyboard only? – Super User

How do i shutdown slitaz from terminal?

There’s no shutdown command in SliTaz, so you’ll have to use halt and family. But by default halt command doesn’t do ACPI off. To get complete shut down instead of hanging on “System halted” message, you can use

poweroff

Note that using halt -p, which is normally a synonym of poweroff, won’t work because BusyBox doesn’t understand this option.

Linux shutdown in 30 seconds?

In a nutshell do: (sleep 5 && shutdown now) &

NOTE: the command backgrounds everything in the paren, the commands will sleep for 5 seconds then shutdown now.


It is possible to get second granularity for the shutdown command.

You can do it by background-ing a bash command.

bash -c "sleep 30; shutdown -h now"&

Here is an example with output. I used the date command to illustrate how long the sleep was.

$ bash -c "date; sleep 5; date"&
[1] 2425

chris@SR-ENG-P18 /cygdrive/c/Projects
$ Tue, Sep 15, 2020  4:30:04 PM
Tue, Sep 15, 2020  4:30:09 PM

[1]   Done                    bash -c "date; sleep 5; date"

In this example, I do the exact same thing except that I spam the enter key a few times to show you that I’m at a prompt during the sleep.

chris@SR-ENG-P18 /cygdrive/c/Projects
$ bash -c "date; sleep 5; date"&
[1] 2467

chris@SR-ENG-P18 /cygdrive/c/Projects
$ Tue, Sep 15, 2020  4:33:47 PM


chris@SR-ENG-P18 /cygdrive/c/Projects
$

chris@SR-ENG-P18 /cygdrive/c/Projects
$

chris@SR-ENG-P18 /cygdrive/c/Projects
$

chris@SR-ENG-P18 /cygdrive/c/Projects
$

chris@SR-ENG-P18 /cygdrive/c/Projects
$

chris@SR-ENG-P18 /cygdrive/c/Projects
$ Tue, Sep 15, 2020  4:33:52 PM

[1]   Done                    bash -c "date; sleep 5; date"

chris@SR-ENG-P18 /cygdrive/c/Projects

I would use this in scripts that need to force a shutdown.

Shutdown mac with keyboard only?

Open Keyboard Shortcuts in System Preferences. Click on Applications Shortcuts in the list at left.

:/>  Как закрепить папку на панели задач Windows 10

Click on the “plus” sign and choose “All Applications” in the pulldown menu. Type in “Shut Down” (WITHOUT the ellipses you’d find after this command in the Apple Menu) and choose whatever keyboard shortcut you want.

(I typically put SHIFT-OPT-COMMAND in front of all of my shortcuts so it’s harder to hit them by accident.)a

Restart your Mac and your new command should show up in the Apple Menu below the normal “Shut Down…” command, along with its new keyboard shortcut.

p.s. you can use this for Sleep and Restart, too.

Windows 10 keeps restarting my pc after shutdown

My Solution for ASUS Desktop (I think Gigabyte MB)

Strangly, but I read it on a forum and cannot find that one again, below worked for me:

Completely power down PC, take out power cord and take out CMOS battery for say at least a minute, I did 5 minutes.

Insert CMOS battery and start up again.

Now of course all bios settings are set to deafult but after continuing the issue was solved. No need for Windows 10 changes.

I think by this method some flag in the cmos is reset which cannot be changed in the CMOS setup.

It came back once, after I changed some devices (VGA card and DVD) but the same job solved it again.

Now running for 6 months witouhout any issues.

Оставьте комментарий

Adblock
detector