Mac Shutdown Command

broken image


Users must be assigned the Shut down the system user right to shut down a local or remotely administered computer that is using the shutdown command. Users must be members of the Administrators group to annotate an unexpected shutdown of a local or remotely administered computer. Click on dictation command and click the + button to create a new command. In the first box enter the phrase shutdown my mac (or whatever phrase you wish to use) 5. In the next box leave it as it is. In the last box choose press keyboard shortcut and enter a keyboard shortcut not used by other apps, I chose.

Have you ever had a need to shut down your Mac, but, for one reason or another, you couldn't actually do it? You might be wondering how that could be—consider a situation where you've left your work machine on, so you can use Remote Login (in the Sharing System Preferences panel) to login to it later from home. While driving home, your recall that maintenance was going to shut down power to the building this evening—and there's your Mac, sitting there with 15 open applications, innocently awaiting its impending power failure. You could, of course, turn around and drive back to the office. But assuming you've got another machine at home, and have enabled remote login to your work machine, you can just continue on home and shut down your work Mac from there.

If you've planned ahead, you've enabled remote GUI control by using the Sharing System Preferences panel—see this Mobile Mac column for more detail on how to set that up. Assuming you've done all this, then you can just connect to the remote Mac's GUI, and pick Shut Down from the Apple menu.

But what if you're not so good at planning, and you've only left the machine with Remote Login enabled? Then you'll want to use the Unix command fittingly named shutdown. This command will shut down the remote Mac, and it has a number of useful options.

Here's how it works. First, you must connect to the remote Mac, typically via ssh, which is enabled using the Remote Login option of the Sharing System Preferences panel. This also implies that the remote Mac must be reachable through any firewalls that might exist between the two machines. On the machine being used to shut down the remote Mac, you'd type something like ssh -l username 12.34.56.78, replacing username and 12.34.56.78 with the proper user name and IP address for the remote machine.

Once you're connected, you need to execute the shutdown command as the root (superuser) user. But before we shut down the machine, let's look at some of the various forms of shutdown.

  • shutdown -h +10 'Shutting down soon!': The -h option tells the system to shut down; +10 means in 10 minutes; Shutting down soon! is the message any users who have Terminal open will see.
  • shutdown -h 0612082000 'Shutting down at 8:00pm tonight': Instead of specifying the relative time until shutdown, you can specify the precise time, using the yymmddhhmm format, and using a 24-hour clock for the time.
  • shutdown -r +15 'Rebooting in 15 minutes': The -r option reboots, rather than shuts down, the system.
  • shutdown now: Shuts down the system immediately.
There are other options available as well; type man shutdown in the GUI to read about them. As I noted earlier, you have to run these commands as root, so you'll need to put sudo in front of it (i.e. sudo shutdown now ), and provide your admin password when asked.

Very important: Keep in mind that, although this will give you a 'clean' shut down (the system will make sure that everything happens in an orderly manner), anything running in the GUI will simply quit—even if you have open documents with unsaved changes. Let me repeat that: unsaved changes in documents open in the GUI will be lost! .

There are other scenarios where this trick is useful, too. One that comes to mind is using it to safely shut down if your display goes kaput. Just remotely login from another Mac and use this command to shut the machine down in a safe manner.

Below you will find the examples of how to bring up and down an interface on a CISCO switch or router.

Shutdown

On the CISCO command-line interface, there is the shutdown interface configuration command to disable an interface and the no shutdown command to enable it.

I will show the examples of these commands, as well as how to check an interface status using the show interfaces status command.

Cool Tip: There is nothing worse then trying to debug a network problem when the problematic interface is unlabeled! Always set the interface description! Read more →

'No Shutdown' Command – Enable Interface

To enable an interface FastEthernet 0/1 on a CISCO switch or router, run:

Mac

On the CISCO command-line interface, there is the shutdown interface configuration command to disable an interface and the no shutdown command to enable it.

I will show the examples of these commands, as well as how to check an interface status using the show interfaces status command.

Cool Tip: There is nothing worse then trying to debug a network problem when the problematic interface is unlabeled! Always set the interface description! Read more →

'No Shutdown' Command – Enable Interface

To enable an interface FastEthernet 0/1 on a CISCO switch or router, run:

To display a status of the interface FastEthernet 0/1, use the show interfaces FastEthernet 0/1 status command:

Cool Tip: Don't let your CISCO device burn in torment! Check its temperature and the fan tray status! Read more →

Command To Shutdown Mac

'Shutdown' Command – Disable Interface

Mac Os Shutdown Command

To disable an interface FastEthernet 0/1 on a CISCO switch or router, run:

Shutdown Command Batch File

To display a status of the interfaceFastEthernet 0/1, use the show interfaces FastEthernet 0/1 status command:





broken image