How to Change Default Startup to MacOS in Ubuntu

Abstract: Resolve the issue of Ubuntu booting by default on Intel Macs by configuring GRUB to automatically start macOS.

Created: 2026-08-22 by

To set macOS as the default boot option in Ubuntu, you must modify the GRUB bootloader configuration file. This involves identifying the correct menu entry index for your macOS partition and updating the GRUB_DEFAULT variable in /etc/default/grub. After saving the changes, run sudo update-grub to apply them. Note that this method applies to Intel-based Macs; Apple Silicon (M1/M2) machines do not use GRUB in the same way.

Understanding GRUB and Default Selection

When you install Ubuntu alongside macOS on an Intel-based Mac, the system uses GRand Unified Bootloader (GRUB) to manage the startup sequence. By default, GRUB selects the first operating system listed in its menu, which is often Ubuntu itself. To change this behavior so that macOS loads automatically, you need to instruct GRUB to remember a specific selection or use a saved state. The previous approach of using string matching for GRUB_DEFAULT is deprecated and unreliable because menu titles can change with kernel updates or OS upgrades. The modern, robust standard is to use numeric indices or the saved keyword. Numeric indices are static but fragile if the menu order changes. The saved method is dynamic and user-friendly, allowing you to change the default temporarily from the boot menu without editing config files again. For most users seeking a permanent fix where macOS always boots first regardless of previous choices, setting the numeric index is the direct solution. However, you must be precise about which number corresponds to your macOS installation.

Identifying Your macOS Menu Entry

Before changing any settings, you need to know the exact position of the macOS entry in the GRUB menu. GRUB counts entries starting from zero. You can find this by restarting your computer and looking at the GRUB screen. If you have multiple Linux kernels installed, they will appear as separate entries. macOS might appear under "OS X" or "macOS". Count carefully:
  • 0: The first item (often Ubuntu)
  • 1: The second item
  • ...
If you are unsure, you can also check the generated GRUB configuration file after running sudo update-grub, but visual inspection during reboot is safer. Ensure you note the exact text of the macOS entry as well, just in case you prefer to use the saved method later.

Modifying the GRUB Configuration

The primary configuration file for GRUB is located at /etc/default/grub. You will need administrative privileges to edit this file. Open a terminal in Ubuntu and use a text editor like nano or vim. sudo nano /etc/default/grub Locate the line that begins with GRUB_DEFAULT=. It likely says GRUB_DEFAULT=0 or GRUB_DEFAULT="Ubuntu". Change this value to the numeric index of your macOS entry. For example, if macOS is the third item in the list, you would change it to: GRUB_DEFAULT=2 Remember that counting starts at 0. If macOS is the second item, the index is 1. Be careful not to skip lines or miscount, especially if you have multiple Windows or Linux entries. After modifying the default value, you should also ensure that GRUB_TIMEOUT is set to a reasonable value, such as 5 or 10 seconds, so you have time to interrupt the boot process if needed. Save the file and exit the editor. In nano, you press Ctrl+O to save and Ctrl+X to exit.

Applying the Changes

Editing the configuration file does not immediately affect the boot process. You must regenerate the GRUB configuration file to apply your changes. Run the following command in the terminal: sudo update-grub This command reads /etc/default/grub and creates a new grub.cfg file in the /boot/grub/ directory. Once this process completes successfully, restart your computer. Upon reboot, GRUB should automatically select the macOS entry based on your new default setting. If you encounter issues, such as the system still booting into Ubuntu, double-check your index number. You can also try the saved method by setting GRUB_DEFAULT=saved and adding GRUB_SAVEDEFAULT=true to the config file. This allows you to hold Shift while booting to choose macOS once, and it will become the new default for subsequent boots. For those interested in more complex setups involving multiple operating systems, see our guide on Triple Boot MacOS, Windows, Linux: Windows Boots over Grub which discusses similar GRUB management challenges. Additionally, if you are considering partitioning strategies, refer to Is adding a macOS partition while having Ubuntu installed possible? for insights on disk layout.

Troubleshooting Common Issues

Sometimes, despite correct configuration, the boot order may not behave as expected. One common issue is Secure Boot interfering with non-Ubuntu OS detection. While macOS usually handles its own secure boot requirements, ensure that your BIOS/UEFI settings allow for multi-boot configurations. Another issue arises if the macOS partition is not detected by GRUB. This can happen if the EFI partition is corrupted or if the macOS bootloader is missing. In such cases, you may need to repair macOS from a recovery drive before adjusting Ubuntu's GRUB settings. If you accidentally lock yourself out of selecting other OSes, you can always revert the change by editing /etc/default/grub again and setting GRUB_DEFAULT=0, then running sudo update-grub. It is important to note that these instructions assume an Intel-based Mac. Apple Silicon Macs (M1, M2, M3) use a different firmware architecture and do not support traditional dual-booting with GRUB in the same manner. They rely on Apple's native boot picker or specialized tools like rEFInd, which operate differently than the GRUB methods described here.

Frequently Asked Questions

Can I use the 'saved' method instead of a numeric index?

Yes, setting GRUB_DEFAULT=saved and enabling GRUB_SAVEDEFAULT=true is often preferred. This allows you to manually select macOS from the GRUB menu once, and it will remain the default until you choose another option. It avoids the risk of miscounting menu entries after system updates.

What if my macOS entry disappears from GRUB after an update?

This can happen if the macOS bootloader is updated or if the EFI partition structure changes. Re-run sudo update-grub to refresh the menu. If macOS still does not appear, you may need to reinstall the macOS bootloader or check your disk partitions using lsblk to ensure the volume is recognized.

Does this work on Apple Silicon Macs?

No. Apple Silicon Macs do not use GRUB for booting in the traditional sense. They use Apple's UEFI implementation and the built-in boot picker (hold Option at startup). Dual-booting macOS and Linux on Apple Silicon requires different tools and procedures, often involving virtualization or specialized bootloaders like rEFInd, not standard GRUB configuration.

How do I verify my current GRUB default?

You can check the current default by reading the active configuration file with cat /boot/grub/grub.cfg | grep -i default. However, this shows the runtime value. For the persistent setting you configured, always check /etc/default/grub directly using grep GRUB_DEFAULT /etc/default/grub.

Is it safe to delete the Ubuntu entry from GRUB?

Technically yes, but it is not recommended. Removing the Ubuntu entry makes it difficult to recover or troubleshoot your Linux installation if something goes wrong with macOS. Keeping both entries available provides a safety net for system maintenance and data access.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More