Mac os reboot to recovery from terminal

How to Access Terminal via Recovery Mode for Mac

Some more advanced Mac troubleshooting and diagnostics techniques require a user to access the Terminal from Mac OS Recovery Mode. We’ll show you how to quickly access the command line while a Mac is booted into Recovery Mode.

For some quick background, on a normally booted Mac, the Terminal application is found within the /Applications/Utilities/ folder, and it can be accessed directly through the folder hierarchy or by using Spotlight to search for and launch Terminal app. But Recovery Mode does not have the same applications directory access, nor does it have Spotlight or Launchpad. Nonetheless, accessing Terminal from Recovery boot mode is easy.

Accessing the Command Line in Recovery Mode on a Mac

  1. Boot into Mac OS Recovery Mode as usual by holding down the Command and R keys during system start
  2. Choose the language as usual (if applicable)
  3. At the “MacOS Utilities” screen, pull down the “Utilities” menu from the top of the screen
  4. Choose “Terminal” to launch Terminal app within Recovery Mode

Terminal app will launch within Recovery Mode, ready for your commands, whether it’s resetting a password, clearing out disk space, disabling or re-enabling SIP in Mac OS, or any of the other myriad functions available via the command line.

Terminal app in recovery mode has fewer commands available to it because it is running off of the recovery partition. Additionally, you will need to manually access other hard drives or disk partitions if that’s what you’re looking to do, though running commands like the disk repair fsck tool and

The terminal is powerful and requires exact syntax to execute commands properly, it’s also unforgiving in that an improperly typed command can have very unintended side effects that are irreversible. That, plus the generally more archaic user interface of text input, make the command line most appropriate for advanced Mac users only. We regularly cover all sorts of Terminal and command line tips, so feel free to browse around and learn a bit more if interested.

Rarely, some Mac users may find that the “Utilities” menu is totally missing from Mac OS recovery mode entirely, which negates the ability to access the Terminal. This is usually due to an issue with the recovery mode partition itself, which may need to be recreated, or due to booting from internet recovery mode rather than normal recover mode.

Источник

Перезагрузка компьютеров с помощью Терминала на Mac

Чтобы перезагрузить компьютер немедленно или в определенное время с помощью приложения «Терминал», используйте команду shutdown или systemsetup . В следующих примерах показано несколько способов использования этих команд. Полная информация о них приведена на man-странице команды shutdown и man-странице команды systemsetup.

Совет. Можно легко перезагрузить Mac, выбрав меню «Apple»

> «Перезагрузить», или выключить компьютер, выбрав меню «Apple» > «Выключить». См. раздел Выход из системы, переход в режим сна, перезагрузка и выключение Mac.

Перезагрузка локального компьютера

В приложении «Терминал» на Mac введите следующую команду:

Немедленная перезагрузка удаленного компьютера

В приложении «Терминал» на Mac введите следующие команды:

Читайте также:  Выбранный inf файл не поддерживает этого метода установки windows

Вместо admin укажите короткое имя учетной записи пользователя на удаленном компьютере.

Вместо computer укажите IP-адрес или имя хоста удаленного компьютера.

Перезагрузка удаленного компьютера в определенное время

В приложении «Терминал» на Mac введите следующие команды:

Вместо admin укажите короткое имя учетной записи пользователя на удаленном компьютере.

Вместо computer укажите IP-адрес или имя хоста удаленного компьютера.

Вместо hhmm укажите время перезагрузки удаленного компьютера (в формате ччмм).

Автоматическая перезагрузка при сбое питания

В приложении «Терминал» на Mac введите следующую команду:

Вместо seconds укажите количество секунд, по прошествии которых компьютер должен загружаться после сбоя питания. Значение должно быть равно 0 (нуль) или быть кратно 30.

Примечание. Можно также задать настройки энергосбережения, чтобы компьютер Mac автоматически перезагружался после сбоя питания.

Источник

Question: Q: Is there a terminal command to reboot into recovery partition?

Command-R does not work with my bluetooth keyboard (2007 MacPro with internal Bluetooth module).

Mac Pro, Mac OS X (10.7)

Posted on Aug 13, 2011 8:41 AM

All replies

Loading page content

Page content loaded

Can you select a start-up drive by holding the ‘option’ key on boot?

Aug 13, 2011 8:49 AM

No because the wireless keyboard will not respond early enough to intercept the normal boot process. And unfortunately, the recovery partition is not selectable as an option in the start-up preferences, so unless plug in a wired keyboard, there is no way for me to boot into the recovery partition. I was hoping for a terminal command-line. It has to do with the bluetooth module. I ordered a bluetooth dongle and hopefully that will kick in earlier.

Aug 14, 2011 6:24 AM

No because the wireless keyboard will not respond early enough to intercept the normal boot process.

Not tried it with a recovery partition but it should, I option-boot mine quite regular. I have the old style white keyboard.

But try Command-R during boot instead.

Aug 14, 2011 6:31 AM

Using option key boot, should definitely show

«Recovery HD». It does on all the Macs I have

installed Lion on. If it doesn’t, it was never created

for one reason or another.

To check, type the following into terminal:

You should get something like this:

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *640.1 GB disk0

1: EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 530.9 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data BOOTCAMP 108.4 GB disk0s4

The EFI is equivelent to the MBR on windows. I have an extra

partition for my Bootcamp installation of windows.

If you have multiple disks attached, there should be a list like

this for all /dev/diskXX that are attached.

Aug 14, 2011 7:11 AM

Timing can be tricky on a BT keyboard. The general consensous is that you press the Option key right after you hear the start up chime. If you press and hold the Option key earlier than that, it will not be recognized. Others have seen a slilghtly different timing serquence. It does work, you just have to find the right timing for your partiuclar combination.

Aug 14, 2011 7:38 AM

Tried every kind of time sequence. I also cannot wake my computer from sleep. It has to do with the BT module. Is there really no way to tell the computer to restart into recovery mode in the Terminal? That would be the best solution save getting a wired keyboard. The reocery HD partition is mindeed installed.

Aug 17, 2011 8:11 PM

I realize this is a very old thread, but there are 30-something people who said they have the same issue and I did find a workaround for this. I use a wireless Logitech keyboard with a USB receiver through a KVM. It’s a standard US/ANSI Windows keyboard layout.

What worked for me was to continuously tap Alt+R together, rather than to try and hold any key down. The same is true for Option to load the pre-boot Startup Disk window. If I do this over and over during the boot sequence, prior to the tone right up until I can see the dark grey background of the recovery environment loading, I can get into the partition every time.

Читайте также:  Drivers ati mobility radeon hd 4200 windows 10

I’m fairly certain anyone trying to get this working is already aware of this important caveat, but in the case of a standard US layout, Cmd/Opt are reversed as Windows Key/Alt respectively, despite what may be written on the keys.

Источник

Reboot Mac OS X from the Command Line

Rebooting a Mac from the command line is fairly simple, though it should be pointed out that most Mac OS X users are best served just using the standard  Apple menu method to issue a system restart.

Nonetheless, for advanced Mac users, using the terminal reboot command can be an invaluable trick for troubleshooting purposes, remote systems administration, remote management through SSH, after installing software updates on a Mac through the command prompt, and a great number of other reasons.

How to Restart a Mac from the Mac OS X Command Line

To start a reboot immediately from the Mac OS X Terminal, type the following command string at a prompt (either locally or remotely):

sudo shutdown -r now

Next you’ll need to enter the administrator password when requested, that’s because the command is prefixed with sudo, which gives the shutdown command superuser privileges that are necessary to issue the reboot command.

The Mac will be immediately restarted regardless of what’s going on, so be sure not to use this if important documents are open and you have something like auto-save turned off.

Another option is to use the following different command to reboot a Mac from the command line:

osascript -e ‘tell app «System Events» to restart’

How to Reboot from the Command Line with a Message

You can add a message to the reboot notice for those logged in through SSH by adding a quote at the end like so:

sudo shutdown -r now «Rebooting Now for OSXDaily.com»

This looks like the following to anyone logged into the Mac:

*** FINAL System shutdown message from user@hostname ***
System going down IMMEDIATELY

Rebooting Now for OSXDaily.com

System shutdown time has arrived

The reporting will reference shutdown whether you are rebooting, shutting down, or sleeping, which is why it can be useful to append a message to the command, which is reported back as the second to last line. Also, the “user@hostname” will be that of whom initiated the reboot.

Using this shutdown command, it would also be easy to modify a past trick to remotely sleeping a Mac to be able to remotely reboot or shutdown a Mac instead.

The shutdown command has been around since the earliest days of Mac OS X and still exists in Lion, Mountain Lion, Mavericks, and Yosemite, Sierra, Mojave, onward. As you may have guessed, the shutdown command can be used for other tasks like actually shutting the Mac down, putting the Mac to sleep instantly like pmset, and more.

Источник

How to Boot Mac into Recovery Mode

Sue Wayne

Sep 08, 2021 • Filed to: Solve Mac Problems • Proven solutions

Recovery Mode in OS X provides a set of solutions for users to utilize when users need to repair and reinstall their operating system in an emergency. You can also reset the Mac password using recovery mode if needed. There are several ways to boot Mac into recovery mode. If you find one method overwhelming, there are several other alternatives you can use. We will walk you through the different ways on how to boot Mac into recovery mode so that they will become undoubtedly useful in a rare emergency.

Part 1: How to Boot Mac in Internet Recovery Mode

Along with the introduction of a locally stored recovery volume, Apple introduced its Internet Recovery service that allows your operating system to download contents of the recovery hard disk partition from the company’s service. This option is great to use when your local drive is completely corrupted and you no longer can access locally-stored recovery tools.

To launch Internet Recovery, make sure your Mac is connected to a WiFi network and follow the steps below:

  1. Reboot your Mac.
  2. Hold the «Options», «Command», and «R» buttons until the boot chimes are triggered.
  3. Wait until the system finished downloading the recovery tools from Apple’s website.
Читайте также:  Windows 10 куда скачивается файл

It is noted that you are unable to boot Mac into Recovery Mode if you are using devices older than the ones below:

  • MacBook Pro (13-inch, Early 2011)
  • MacBook Pro (15-inch, Early 2011)
  • MacBook Pro (17-inch, Early 2011)
  • iMac (21.5-inch, Mid 2011)
  • iMac (27-inch, Mid 2011)
  • MacBook (13-inch, Mid 2010)
  • MacBook Pro (13-inch, Mid 2010)
  • Mac mini (Mid 2010)
  • MacBook Pro (15-inch and 17-inch, Mid 2010)
  • iMac (21.5-inch and 27-inch, Mid 2010)
  • MacBook Air (11-inch and 13-inch, Late 2010)

Part 2: How to Create a bootable drive into Recovery Mode

You can create a bootable drive to store an OS X Recovery Disk so that you can access recovery tools anytime, anywhere. It would be great if you could invest in a high-capacity USB 3.0 flash drive to store the required tools.

There are plenty of articles outlining how you can create a bootable OS X Recovery Disk, including ours. Once you have this established, you can follow these steps to get your Mac into Recovery Mode:

  1. Reboot your Mac.
  2. Hold down «Option» on your keyboard once you hear the chime sound.
  3. Attach your bootable OS X Recovery Disk to your Mac and select it from the prompt list.
  4. Your Mac will launch into Recovery Mode and you can start fixing your Mac.

As you can see, there are plenty of methods you can use to boot Mac into Recovery Mode. There is no need to panic when you find yourself in trouble — just choose and master the method that seems least intimidating to you and you will be well on your way. After you boot Mac into Recovery Mode, you can also restore your data on Mac.

Part 3: How to Boot Mac with Installation Disk

If you are using an older Mac, it probably comes with a grey recovery DVD that you can use to run recovery routines. If you had bought a copy of a newer operating system, you can also use the installation disk to perform recovery.

It is the easiest way to go into Recovery Mode and here is how you can do it:

  1. Insert the grey DVD and reboot your Mac.
  2. Hold down «C» on your keyboard until you hear the boot chimes.

The recovery tool will take some time to load. Follow the wizard that will put your Mac into Recovery Mode.

Part 4: How to Boot Mac into Recovery Mode with Local Recovery

  1. Reboot your Mac.
  2. Hold the «Command» and «R» buttons until the boot chimes are triggered.
  3. You will see the OS X utility window that will prompt you to choose one of the four options.

Part 5: How to Boot Mac into Recovery Mode from Time Machine

It is really important to keep backups of your machine and Apple facilitates this with its Time Machine feature. It would be best to store your backup on an external drive so that you can initiate Recovery Mode using this when your hard drive is wiped out.

Follow these steps to boot Mac into Recovery Mode:

  1. Reboot your Mac.
  2. Hold down the Option button when the startup chimes sound.
  3. Connect your Time Machine drive. It will take some time for the system to detect the drive. You might need to key in your password.
  4. Choose the drive to launch your Mac into Recovery Mode.

After all the above methods, you finally fail to boot your Mac into Recovery mode. Don’t worry. We also provide further solutions for you — Fix «Cannot boot into Recovery mode». For those who need the data recovery solution, Recoverit would be a nice option. Free download and try it now.

Video Tutorial on How to Boot Mac into Recovery Mode

Recent Videos from Recoverit

Источник

Оцените статью