Will linux run on mac

Linux has been ported to run on Apple’s M1 Macs

You can now get more than just macOS for M1 Macs

Share this story

Share All sharing options for: Linux has been ported to run on Apple’s M1 Macs

Photo by Vjeran Pavic / The Verge

A new Linux port allows Apple’s M1 Macs to run Ubuntu for the first time. Corellium, a security firm that offers a virtualized version of iOS for security testing, has successfully ported Ubuntu over to M1 Macs and released a tutorial for others to follow. The modified version of Ubuntu boots into the regular user interface and includes USB support.

The team at Corellium have detailed exactly how they managed to get Ubuntu running, and it’s a good in-depth read if you’re interested in the details. While a number of M1 components are shared with Apple’s mobile chips, the non-standard chips made it challenging to create Linux drivers to get Ubuntu running properly.

Apple hasn’t designed its M1 Macs with dual-boot or Boot Camp in mind. Craig Federighi, Apple’s senior vice president of software engineering, has previously ruled out official support for natively booting alternate operating systems like Windows or Linux. Virtualization seems to be Apple’s preferred method, but that hasn’t stopped people from making their own ports.

Linux is now completely usable on the Mac mini M1. Booting from USB a full Ubuntu desktop (rpi). Network works via a USB c dongle. Update includes support for USB, I2C, DART. We will push changes to our GitHub and a tutorial later today. Thanks to the @CorelliumHQ team ❤️ pic.twitter.com/uBDbDmvJUG

Hector Martin, a developer who regularly gets Linux running on a variety of hardware, is also porting Linux to M1 Macs. Developers seem to be enticed by the performance benefits offered by Apple’s M1 chips, and the ability to run Linux on a silent ARM-based machine. “I’ve been waiting for an ARM laptop that can run Linux for a long time,” said Linux creator Linus Torvalds back in November. “The new Air would be almost perfect, except for the OS.”

Corellium CTO Chris Wade describes this new port as “completely usable” on a Mac Mini M1, and it works by booting the full Ubuntu desktop from USB. You will need a USB-C dongle to get networking working, though, and the process to get the port running will require some familiarity with Linux and custom kernels. Corellium has posted a tutorial on the process, if you’re interested in trying this beta project out.

Corellium has some experience in working around Apple’s operating system protections. Corellium offers security researchers a virtual iPhone to help with vulnerability exploration. It’s a process that has angered Apple enough to file lawsuits against Corellium. Apple lost an early challenge against Corellium late last year, after initially filing a lawsuit against the company on copyright grounds back in August 2019. Apple later alleged DMCA violations in January 2020, and a judge dismissed the copyright infringement claims in December. A ruling on the separate DMCA allegations has been deferred.

Источник

Is there a way to run a Linux binary on macOS?

Is there a way to run a Linux binary in macOS? I tried to run a binary but it said it isn’t executable.

Читайте также:  Linux firewall with gui

4 Answers 4

I recently starting using Noah to run Linux binaries in macOS. You can install using homebrew ( brew install linux-noah/noah/noah ). Then you should be able to do this:

In my experience the behavior of the binary matches what I see on my Ubuntu machine.

These answers are half correct, because virtualization is a choice but there is another. May I present.

History

  1. First there was UNIX, circa 1972
  2. Then the Timeline Split
    • In 1977, for $90, Bob Fabry and others, compiled/built the first versions of BSD, short for Berkeley Systems Distribution.
    • In 1991, Linus Torvalds posted in a Newsgroup, about software he used from Richard Stallman, who started GNU in 1983, and Linus’es UNIX was born.
    • Apple reacquired NeXT Software in 1996, after Steve Jobs was fired from Apple in 1984, and used the software and people there to build OS X. OS X is the Darwin OS + the NeXT Desktop Environment. And now we’re back to Bullet #1, as Darwin is a closed source fork of BSD. For the Open Source Project, see PureDarwin. For the Official Apple Developer Page, see Apple Open Source.

How We Can Use This

BSD’s traditionally use the Ports system for Package Management. The most widely used of these are the FreeBSD Ports. Ports are packages installed directly from source. Since the same Linux applications come from the same sources, you can run a Linux application if its port exists. Don’t use these Ports on a Mac because.

Since all of Apple’s GUI’s are written using the Cocoa API — WikiEntry, bundled with XCode — OS X for Developers, the Ports can be tuned to take advantage of this:

  1. Install XCode for your version of OS X.
  2. Bundled inside XCode is Apple’s version of the GCC Compiler, and all the other associated tools. To update the tools, see this post on StackOverflow. The tools are OS Version dependant, ie they are not backwards compatible, to my knowledge (in short, don’t install XCode for 10.8 on 10.6, etc.)
  3. Having installed XCode you now have a compiler, and can head on over to the MacPorts page and browse for the port you need installed, after installing the MacPorts .pkg installer

Caveat

The ports system doesn’t necessarily do dependency checking, unless the port was well written. I lightly touched on the problem in what does elibc_FreeBSD mean in gentoo portage overlays?

Источник

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

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.

Читайте также:  Мобильный хот спот windows 10 автозапуск

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

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

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

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.

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

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.

Читайте также:  Grub and mac os

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

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

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.

Источник

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