In this article you will find the following:
- Is it possible to run Linux on Mac?
- Methods for installing Linux on a Mac
- Prepare Mac for installing Linux
- Create a partition on Mac drive
- Install rEFInd on Mac
- Create a USB installer
- Download Linux on Mac from USB installer
- Install Linux on Mac
- Dual boot Linux with macOS
- Replace macOS with Linux
- Use a virtual environment to install Linux on Mac
- Choose a virtualization app
- Choose your ISO file
- Save the virtualization file and wait for the install to finish
- Running Linux on Mac has never been easier
Running Linux on your Mac is a great way to get a customized OS and create an even more conducive environment for software development. Linux is known for its flexibility, as it's used to power a variety of devices—from phones to scientific computers.
Not to mention, the majority of systems used in the IT field are Linux-based distributions. So, if you're a professional in this sector, your workstation is likely powered by Linux.
Don’t know how to get Linux on Mac? Luckily, it’s quite simple to do. After reading this guide, you shouldn’t have any problems with installing and running Linux.
BEFORE WE BEGIN
Ready to download and install Linux? Start with a small preparation first—clean and back up your Mac. You’ll be glad to know that with MacKeeper’s Safe Cleanup, it’s safe and easy to clean your Mac. With a click of a button, you can remove junk files whilst keeping personal files safe.
Here’s how you clean your Mac with MacKeeper’s Safe Cleanup:
- Download MacKeeper
- Launch MacKeeper and select Safe Cleanup from the left pane
- Click Start Scan
- Select Clean Junk Files
- Now your junk files are removed safely.
Now let’s get back to the question of Linux installation in more detail.
Is it possible to run Linux on Mac?
The great thing about Linux is, there are several ways to run the open-source operating system on your Mac.
As Linux has different distributions for Mac, here are some of the most popular ones:
- Ubuntu. One of the leading Linux distributions for Mac users as it’s one of the most compatible when it comes down to driver support
- Manjaro. For the more experienced users, this distribution is known for its high speed and top-notch performance
- Deepin. An extremely user-friendly distribution as its layout is a combination of Windows and Mac features.
Methods for installing Linux on a Mac
Depending on your specifications, there are a few ways you can install Linux on your Mac.
The methods for installing Linux on a Mac include:
- Dual booting Linux with macOS
- Replace macOS with Linux entirely
- Install Linux using a virtualization app
At this moment, Apple silicon chip users can’t install Linux, even if they use an M1, M1 Pro, or M1 Max. The only way you can run Linux on an Apple silicon Mac is by using a virtual machine. On the other hand, it’s possible to use a bootable Linux USB drive, but the performance won’t be up to par.
Prepare Mac for installing Linux
Before we get to installing Linux, you’ll need to prepare your Mac.
Here’s how to prepare your Mac for installing Linux:
1. Find a USB flash drive with at least 2GB of storage to install Linux. You’ll end up deleting the USB drive to install a distributor in the future, so make sure you back it up beforehand
2. Connect your Mac to the internet via an Ethernet cable. In case your selected distributor doesn't allow you to connect to the internet without a third-party app
3. Prepare to dual boot your Mac with Linux by clicking the Apple logo in the top left. Then select About this Mac > Storage, and ensure you have a minimum of 25GB of storage free
4. Create a backup of your Mac. It’s unlikely you’ll lose data when dual-booting Linux and macOS. Although, if you encounter an issue, you might have to wipe your Mac to fix it.
Create a partition on Mac drive
If you plan to dual-boot Linux with macOS, the next step is to create a partition for Linux and another as a swap space. You do that by partitioning your Mac drive.
Here’s how to create a partition on Mac drive:
1. Type Disk Utility in Spotlight and hit Enter
2. Click View in the top left and make sure Show All Devices is selected
3. Choose your macOS partition and select Partition
4. Now, click the plus (+) button and make a new partition, then select Add Partition
5. You can rename the partition Linux and make sure the format is set at MS-DOS (FAT32)
6. Follow the above steps once more to create a new partition for the swap space. You can name this space SWAP and adjust the format to MS-DOS (FAT). Ensure the size amount is the same amount of RAM you have on your Mac
7. To create the partition, select Apply
8. Select Partition > Continue
9. Ensure you wait for the process to complete.
Install rEFInd on Mac
Using a third-party boot manager is an effective way of loading Linux, as you can choose between macOS and Linux from the start-up. Also, some Linux distributors aren’t compatible with Mac’s standard boot manager, therefore, it’s a necessary step to run Linux on Mac.
You can't install rEFInd on Mac if System Integrity Protection is enabled, so you’ll have to temporarily disable it. It’s a crucial component of your Mac’s security, so ensure to turn it back on after the installation.
Here’s how you install rEFInd on Mac:
- Disable System Integrity Protection
- Download rEFInd
- Launch Terminal by searching via Spotlight
- Drag and drop the refind-install to the Terminal window
- Hit Enter
- Enter your Admin password when asked and hit Enter
- Once the installation is complete, ensure to turn System Integrity Protection back on.
When you boot up your Mac next, the rEFInd menu should come up right away. However, if you don’t see the menu, hold Option whilst you boot your Mac to load the startup manager.
Create a USB installer
To create a USB installer, you’ll have to use a third-party app such as Etcher, to make an image from your selected Linux distributor.
Here’s how to create a USB installer:
- Choose and download the latest version of a Linux distributor (for this article, we’re referencing Ubuntu)
- Type Disk Utility in Spotlight and hit Enter
- Click your chosen USB drive, and select Erase
- Now, set the USB drive as MS-DOS (FAT) and the scheme as GUID Partition Map
- Launch Etcher and choose Select Image
- Select and open your chosen Linux Distributor
- Click Select target and pick your USB drive
- Select Flash and type in your administrator password.
Download Linux on Mac from USB installer
Although you’ll save space by downloading Linux from a USB installer, it may cause the operating system to run slowly as it’s running off a USB drive. Bear that in mind when choosing which way to run Linux.
Here’s how to download Linux on Mac from USB installer:
- Restart your Mac and hold the Option key
- Reinsert the flash drive
- When you see the boot loader select Boot EFI and press Enter.
Install Linux on Mac
Now all of the previous steps are out of the way, we’ll go into how to install Linux.
Note: You’ll have to use an Ethernet cable to connect your Mac to Wi-Fi to install Linux.
Follow these steps to install Linux on Mac:
- Click your Linux distribution install icon
- Continue with the on-screen instructions
- Pick Normal installation and click Install third-party software
- When completed, click Continue.
Dual boot Linux with macOS
First, we’ll look at how to dual-boot Linux with macOS. It’s simple when you know what to do, just be sure to follow these steps carefully.
Here’s how to dual-boot Linux with macOS:
- Click Something else in the Installation Type window. This step is important, as it’ll allow you to select the partition you created to install Linux. You could override your operating system if you don’t pick the correct option.
- Select your created Linux partition. If you can’t see it, look for fat32 in the name.
- Choose Change
- In the Use as drop-down menu, pick Ext4 journaling file system
- In the Mount point drop-down, select the slash
- Click OK
- When prompted, select Continue
- Now, find the SWAP partition you created earlier
- Double click it, and in the Use as drop-down select swap area
- Select OK
- Launch the Device for boot loader installation drop-down and select your Linux partition once more
- Double check you’ve chosen the right partitions and select Install Now
- In the pop-up menu, choose Continue.
Replace macOS with Linux
Next, we’ll dive into how to replace macOS with Linux. If this is your selected way to run Linux, please note that this step will erase everything on your Mac. So, ensure you’ve backed up your Macbook before you start this process.
Follow these steps to replace macOS with Linux:
- In the Installation type window, click Erase disk and install Ubuntu
- Select Install Now and choose your hard disk
- Continue with the on-screen instructions.
Use a virtual environment to install Linux on Mac
Finally, we’ll reveal how to use a virtual machine to run Linux. It’s amongst the top performers when it comes down to running Linux. However, certain features like graphic drivers will only work efficiently with bare metal. Also, don't anticipate that intense disk I/O operations will be successful, such as testing video games.
Choose a virtualization app
When using a virtual environment to install Linux on Mac, you need to choose a virtualization app that caters to your needs.
Here are a few of the most popular virtualization apps:
- Parallels Desktop - This is one of the fastest virtualization apps around, and you can install macOS from the recovery partition on Intel-based Macs
- Virtual Box - One of the leading free virtual machines, with over 100,000 users
- VMWare Fusion - Popular amongst developers as you can run hundreds of operating systems on the virtualization app.
Choose your ISO file
Now, you'll have to select the ISO file. A disk image in ISO format, holding your chosen Linux distribution is necessary here. You can download an ISO file from your Linux distribution’s main page.
Here’s how to choose your ISO file:
- Download the ISO file and save it somewhere with easy access
- Open your Virtual Machine
- Select the option to create a new virtual machine
- Proceed with the on-screen instructions. Ensure to be careful during these steps, you’ll want to make the most personally suited version of Linux as possible
- If you’re not happy with the version you made, you can simply delete your current version of Linux and go again.
Save the virtualization file and wait for the install to finish
You’ve chosen your ISO file, and it’s time to configure the storage. When selecting the storage space for a Linux virtual machine, remember that the available storage on your Mac will reduce accordingly.
Follow these steps to save the virtualization file and wait for the installation to finish:
- You’ll be prompted to save your Linux Virtualization app. Essentially, this will create a virtual machine app
- This process can take a while, from minutes to hours, so be patient during this time
- After this process, you’re all set to use Linux in a virtual environment.
Running Linux on Mac has never been easier
After following this guide, you should now be successful in running Linux on your Mac.
As we’ve covered, there are several effective ways to use Linux on your MacBook. Just remember to prepare your Mac accordingly before installing the operating software. Using a third-party app such as MacKeeper’s Safe Cleanup is a quick and efficient tool to remove junk files without no harm to your personal files and free more space before installing Linux on your Mac.