Tech Tip: How to Install and Run Linux on a Mac

Tux the penguin, the official mascot of Linux.

Linux is an open-source Unix-like operating system that has been available in one form or another since 1991. Many servers operate on Linux, which is probably its primary use case. Early on in the Linux timeline, it was thought that the operating system would be popular for home and educational use; instead, those areas have been dominated by macOS, Windows, and more recently ChromeOS on Chromebooks. There’s still a lot of interest in Linux in the IT and scientific communities, and it’s a popular OS to learn more about. Today, we’ll look at two ways that you can quickly install and run Linux on a Mac.

Running Linux in Parallels Desktop
Probably the easiest way to set up Linux on a Mac is to create a virtual machine (VM) in Parallels Desktop. Parallels is an extremely popular VM environment for Mac, available from MacSales.com for just $79.95. The best things about Parallels Desktop for those interested in trying out Linux is that it includes free distributions for Ubuntu, Fedora, CentOS, and Debian GNU/Linux (a Linux-like OS that uses the Linux kernel). As an example, we’ll show you how to install Ubuntu in Parallels Desktop 12.

1) Make sure you have Parallels Desktop 12 installed and running on your Mac.

2) At the Parallels Wizard window that appears upon launching the Parallels Desktop environment, click “Download Ubuntu” from the list of Free Systems listed at the bottom of the window (see image below):

The Parallels Wizard, showing Free Systems listed near the bottom of the window

The Parallels Wizard, showing Free Systems listed near the bottom of the window

3) Click the Continue button once the Ubuntu logo is highlighted. A window describing Ubuntu is displayed, with a Download button in the lower right corner. Click the Download button, and Parallels Desktop begins to download the Ubuntu distribution files to your Mac.

4) Ummm…that’s really about it. Everything is installed in a brand spankin’ new virtual machine, and you’re presented with an Ubuntu login screen asking you to enter a new password:

Ubuntu Linux running in a Parallels Desktop virtual machine on macOS Sierra

Ubuntu Linux running in a Parallels Desktop virtual machine on macOS Sierra

5) To gain access to files on your Mac as well as external drives, it’s a good idea to install the free Parallels Tools for Linux. That’s done with a single click on the yellow “caution” triangle that’s seen in the menu bar at right in the image above. Reboot the Ubuntu VM after installation and log in again. This time, you’ll see the full Ubuntu desktop, complete with the “Dock” at left showing a variety of pre-installed apps like LibreOffice, Amazon, the Firefox web browser, and more:

A popular Mac website open in Firefox on Ubuntu 16.04

A popular Mac website open in Firefox on Ubuntu 16.04

Install Linux in Oracle VM VirtualBox
Don’t have the bucks for Parallels Desktop? There’s a completely free way to run Linux in a virtual machine using Oracle VM VirtualBox. It’s a free virtual machine system without a lot of the bells and whistles available with Parallels, but it’s perfect for those who just wish to experiment with another operating system without spending money.

1) Download a free copy of Oracle VM VirtualBox from www.virtualbox.org. The file ends up in the Downloads folder; find it, and double-click it to mount the .dmg disk image file (see image below):

The Oracle VM VirtualBox installer window.

The Oracle VM VirtualBox installer window.

2) Per the instructions, double-click the package file to run the installer. Let the installer have access to your system, then click Continue, change the install location if required, click Install to install Oracle VM VirtualBox on your Mac. Enter your user name and password when prompted.

3) At the end of the installation, you’ll be asked if you wish to move the Oracle VM VirtualBox installer to the Trash. It’s a good idea to keep things clean, so click Move to Trash.

4) Find the Oracle VM VirtualBox app in the Applications folder and launch it. In the window that appears, click on the blue New button to begin installation of a virtual machine.

5) Enter a name for your VM and select the type (Linux) and version of Linux to install. There are quite a few choices; for the purposes of this article we’re selecting Ubuntu (64-bit):

Naming the VM and selecting the type and version of Linux to install

Naming the VM and selecting the type and version of Linux to install

6) Click the Continue button. Over the next few pages you’re asked to select the amount of RAM to be allocated to the VM (use the recommended amount), to create a virtual hard disk file (use the recommended size), the hard disk file type (select VDI), whether the VM hard disk file should grow (dynamically allocated) or be of fixed size (choose dynamically allocated), and the location and name of the virtual hard disk. Instead of the standard 8GB virtual hard disk size, select 16.00 GB so that the Ubuntu installer has plenty of space to perform the installation. Between each question, click Continue or Create.

7) Here’s the big difference between Oracle VM VirtualBox and Parallels; you’ll need to download the installation disk image for your Linux distribution and make it available for installation of Linux. For Ubuntu, click this link to get to the download page and click the LTS version Download button to start the file download. Ubuntu is user-supported, so if this is the distribution of Linux you’re going to install, consider donating to the cause.

8) When the download is finished, an ISO disk image file (.iso) is in your Downloads folder.

9) Now return to the Oracle VM Virtual Box Manager window. Click the Ubuntu VM to select it, then click the green Start arrow.

10) A dialog appears asking you to select a disk image to start up from. Point this to the .iso file downloaded in steps 7 and 8, then click Start (see image below):

Selecting a disk image to boot from

Selecting a disk image to boot from

11) The next dialog asks you to select a language, then asks if you wish to “try Ubuntu” (run it from the disk image) or “install Ubuntu” (actually install it on the VM). Click Install Ubuntu.

12) You’ll be asked if you wish to download updates while installing Ubuntu or Install third-party software for graphics and Wi-Fi hardware, Flash, MP3 and other media. Check both boxes, then click Continue.

13) Since your VM currently has no operating system installed, select Erase disk and install Ubuntu on the next screen, then click Install Now. Note that this is not erasing your Mac hard drive — it’s erasing the virtual hard drive.

14) You’re asked “where you are”. Select your time zone and click Continue.

15) Select the proper keyboard layout for your country, or click “Detect Keyboard Layout” if you’re unsure. Click Continue.

16) Next, it’s time to set up yourself (or someone else) as a user. Enter your name, a computer name, a username, and a password. Require your password to log in (if you’ll actually be doing work on this VM), and optionally encrypt your home folder. Click Continue.

Creating a user in Ubuntu

Creating a user in Ubuntu

17) After a lot of installation action, you’re asked to restart the computer. Click the Restart Now button. You will most likely see a message asking you to “remove the installation disk” and press Enter. Just press Enter, and Ubuntu loads from the installed VM. Log in using the username and password from the previous step, and you’re up and running on a completely free Linux distribution.

Conclusion
Linux is a powerful operating system with a wealth of open-source software. The great thing? You don’t need another Mac or PC to try it on; you can easily create a virtual machine through Parallels Desktop, Oracle VM VirtualBox, and other virtualization applications. Let us know what your favorite Linux distribution is — and why — in the comments below.


LEAVE A COMMENT


  • I’m really surprised by the failure of the author and of the other commenters here to even mention the Ubuntu-downstream Linux distro, “elementary OS”, and why it is especially significant for Mac users transitioning into also using Linux.

    It’s certainly not new. Seriously, every Mac user and Mac support professional interested in Linux ought to at least be familiar with it.

    elementary OS
    https://elementary.io/

    elementary OS – Wikipedia
    https://en.wikipedia.org/wiki/Elementary_OS

    elementary OS, Linux Mint, and Ubuntu are reasonable first-choice distros to consider for users with Mac experience, particularly when concerned with desktop UI and UX. (openSUSE is also popular with some.)

    Some have come to consider Ubuntu a sort of popular “standard” for desktop Linux. It certainly has established its own community within the Linux world.

    CentOS (Community enterprise OS) is Red Hat Enterprise Linux (RHEL) re-branded and complied for those who don’t wish to compile or pay Red Hat, but who do desire or require platform stability and compatibility with RHEL, and who may need the option to easily migrate to a RHEL support contract in the future.

    CentOS is particularly popular with scientists, researchers, and academics in government, academia, and other research organizations; as well as some business startups employing Linux for enterprise applications. It is now a widespread standard in those communities and their organizations. (Others may prefer BSD UNIX open source derivatives, such as FreeBSD and NetBSD — which have notably contributed to the underpinnings of macOS itself.)

    Ubuntu, and downstream derivatives of it like elementary OS and Linux Mint, are generally better choices than CentOS for desktop users new to Linux.

    However, probably none of these distros, in their default installations of their current versions, are really good for use on older or vintage Mac hardware. Instead, either custom configured-installs, or installers of lightweight varient flavors of these distros, or other lightweight distros specfically targeted to older hardware, are necessary. Unfortunately, research and/or experienced guidence are necessary — making general recommendations is currently difficult, because the possibilities are dependent upon the particular Mac involved, and what its hardware consists of.

    As for other Linux distros — Debian, Fedora, PCLinuxOS, Arch, Gentoo, Slackware, Linux From Scratch (LFS), etc., are primarly for those more familiar with Linux, and who can determine for themselves why they might prefer another distro for their purpose(s) over the others mentioned above. (PCLinuxOS is relatively novice-friendly, but it does not seem to currently be popular enough to recommend to someone just getting into Linux on their own.)

    Clarification Note:

    *All* “Linux” distros are really GNU/Linux, whether they explicitly acknowledge that or not. There are no Linux distros that are not dependent on GNU free and open-source system software and other software. Whether GNU is explictly credited or not is merely a matter of terminology and philosophy.




  • You don’t have to do any of the above. Simply partition your drive, install Linux on the partition and use the boot option key on your Mac. Why make it any harder?




  • I like Linux Mint. Yes, it’s based on Ubuntu and uses their repositories but I much prefer the user interface. It’s clean and simple. I used to use Ubuntu but gave up on it after they went to the Unity intrface or whatever they call it which I absolutely couldn’t stand. Anyway, Mint runs flawlessly on my MacBook Pro running in Parallels 8.




  • Its pretty obvious that one can run Linux in a virtual machine but what about running Linux directly on Mac hardware? Macs hardware is mostly off-the-shelf components like Intel CPUs, RAM and hard disk. I have often wondered if it’s possible to BootCamp my MacBook Pro to Ubuntu instead of Windows. The usefulness of doing so may be somewhat muted though since many Linux functions are also available on Mac OS especially through the Terminal app.




    • Yes, since the days of Mac OS X Lion it’s been possible to use the Boot Camp partition for loading Ubuntu and other distros right on the machine without an intervening virtual machine. I’d suggest using an install disk or flash drive that’s ready to roll, creating the Boot Camp partition, then booting from the installation disk/drive. Point the installation to the Boot Camp partition, and you’re ready to rock ‘n roll.




    • I have installed and run linux on a IMAC




    • After Apple dropped s/w support for my old powerMac and macbookpro, (OS 10.6 ) they now both run the most recent Ubuntu 14.4! The used price is awful, but I guess no one (well) has yet discovered Ubuntu is current. They work like a charm, AND I am now independent of the latest unavailable MAC upgrades!




  • Can I run Linux on Parallels 8, which I have?




  • There are a number of Linux OSs but nowhere have I seen a description of their preferred functions. You mentioned in this article that Linux was generally a server language, but there has to be other details about the various ‘dialects’ of Linux. I would like to see an article on that topic.




  • Only VMware Fusion works to control machines via USB from Linux or Windows on Mac. The others fail.




  • Nowadays there are other contenders as well. I’ve had great luck with Veertu (open source, like VirtualBox):
    https://veertu.com/

    And nowadays there’s Parallels Desktop Lite for free in the Mac App Store:
    https://itunes.apple.com/us/app/parallels-desktop-lite/id1085114709




  • You forgot to mention VMWare Fusion which I’ve always found better for Linux than parallels. Parallels is better for Windows though.




    • OWC markets and sells Parallels Desktop for Mac.

      Here, OWC also kindly suggests a free alternative, Oracle VM VirtualBox, and provides instructions.

      However, OWC does not carry the competing, commercial VMware Fusion product.

      Regardless, each has its advantages and disadvantages, and these have varied over time with new releases of these products.

      We acquired Parallels some years ago through OWC, and have used it to run both Windows 7 and Ubuntu in VMs.

      In the past, we have found Parallels’ upgrade costs, policies, and in-application self-promotion and marketing to be ridiculous and annoying, having resulted in a poor UX for us. It effectively, unprofessionally doubles as adware for itself. We cannot currently recommend Parallels, for that reason alone.




      • Mail.app is so dysfunctional in recent macOSes I use Snow Leopard for email. I’ve tried the third party email clients, none are as powerful as Mail.app in Snow Leopard.

        So I run Snow Leopard in a virtual machine. For years I preferred VMware over Parallels. Since its sale updates are slower and overall it seems buggier. In the latest version Snow Leopard stalls incessantly. So I switched to Parallels.

        With Parallels 11 and earlier I could install a single license on both my laptop and desktop. I never run both copies at the same time since I copy my virtual machines between the two.

        With 12, Parallels is licensed per computer. Since I can only upgrade once using my 11 copy, I’d have to buy a second at full retail. IMHO this change was a money grab. I returned 12 for a refund and am using 11.

        Parallels is not without issues. It’s annoying enough that I’ll be testing VirtualBox and Veertu.