Linux on Apple devices: Difference between revisions

Content deleted Content added
Added why run linux on apple devices and how to run linux on apple devices
Tags: Reverted nowiki added Visual edit
WikiCleanerBot (talk | contribs)
m v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation)
 
(21 intermediate revisions by 18 users not shown)
Line 1:
{{Short description|Linux kernel running on devices made by Apple}}
== Why Run Linux on Apple Devices ==
Apple is great at a lot of things, but they are not the best at everything. Running Linux on an Apple device gives you the opportunity to get the best of both worlds. One thing in particular Apple does well is wireless sharing.<ref>{{Cite journal |last=Stute |first=Milan |last2=Kreitschmann |first2=David |last3=Hollick |first3=Matthias |date=2018-10-15 |title=Demo: Linux Goes Apple Picking: Cross-Platform Ad hoc Communication with Apple Wireless Direct Link |url=http://arxiv.org/abs/1812.06743 |journal=Proceedings of the 24th Annual International Conference on Mobile Computing and Networking |pages=820–822 |doi=10.1145/3241539.3267716}}</ref> They are truly ahead of the game in this respect. Linux’s main selling point is its customizability which Apple simply does not allow. Essentially, Apple is very hardware oriented while Linux is very software oriented.<ref>{{Cite journal |last=Chacos |first=Brad |date=December 2013 |title=The Free OS Revolution |url= |journal=Business Source Premier |volume=31 |issue=12 |pages=7 |via=EBSCO}}</ref> If you were to run Linux on an Apple device, you could enjoy Apple’s perks, like its wireless sharing, and enjoy Linux’s perks, like its customizability.
 
== How to Run Linux on Apple Devices ==
First of all, you need to make sure you have a compatible device.<ref name=":1">{{Cite web |date=2022-06-12 |title=How To Run Linux on iPhone / iPad & How They Achieved This - iDevice Central |url=https://idevicecentral.com/apple/how-to-run-linux-on-iphone-ios/ |access-date=2023-04-13 |language=en-US}}</ref>
 
List of Compatible Devices:<ref name=":1" />
 
·      iPhone 5S
 
·      iPad Air and Air 2
 
·      iPad Mini 2 and Mini 3
 
·      iPhone 6 / 6 Plus
 
·      iPod Touch 6
 
·      iPad Mini 4
 
After ensuring you have a compatible device, there are a few things you will need to install from GitHub.<ref name=":1" />
 
List of GitHub links:<ref name=":1" />
 
·      [https://github.com/konradybcio/pongoOS PongoOs]
 
·      [https://github.com/konradybcio/linux-apple Dybcio’s Fork]
 
·      [https://github.com/corellium/linux-sandcastle/blob/sandcastle-5.4/dtbpack.sh Correllium’s dtbpack Script]
 
After downloading the last link, you will need to change the DTBPATH to arch/arm64/boot/dts/apple/socname-devicename.dtb.<ref name=":1" />
 
Once that is done, you will need to enter this script:<ref name=":1" />
 
make -j$(nproc)
 
macOS: /Applications/checkra1n.app/Contents/MacOS/checkra1n -v -V -p -c -k /path/to/pongoOS/build/Pongo.bin
 
Linux: ./checkra1n -v -V -p -c -k /path/to/pongoOS/build/Pongo.bin
 
arm64:make -j$(nproc) Image.lzma dtbs
 
!arm64: make ARCH=arm64 CROSS_COMPILE=your-cross-compiler- -j$(nproc) Image.lzma dtbs
 
cd /path/to/linux-apple
 
/path/to/dtbpack.sh
 
<nowiki>#</nowiki> Load Linux to the device and boot it!
 
python3 /path/to/pongoOS/scripts/load_linux.py -k /path/to/linux-apple/arch/arm64/boot/Image.lzma -d /path/to/linux-apple/dtbpack [-r /path/to/some/ramdisk]
 
 
You can also just download a virtual machine and run Linux on an Apple device that way. Apple walks you through how to do that on their website.<ref>{{Cite web |title=Running Linux in a Virtual Machine |url=https://docs.developer.apple.com/documentation/virtualization/running_linux_in_a_virtual_machine |access-date=2023-04-13 |website=Apple Developer Documentation |language=en}}</ref> The virtual machine is going to be used on Apple devices that are not mobile. This again allows you to enjoy the perks of both operating systems without having to spend money on more devices.{{Short description|Linux kernel running on devices made by Apple}}
The [[Linux kernel]] can run on a variety of devices made by [[Apple Inc.|Apple]], including devices where the [[Bootloader unlocking|unlocking of the bootloader]] is not possible with an official procedure, such as [[iPhone]]s and [[iPad]]s.
 
== iPad devices ==
In June 2022, software developers Konrad Dybcio and Markuss Broks managed to run Linux kernel 5.18 on a [[iPad Air 2]]. The project made use of the [[Alpine Linux]] based [[Linux distribution]] called [[postmarketOS]], which is primarily developed for [[Android (operating system)|Android]] devices. The developer suggested that they used the [[checkm8]] exploit which was published back in 2019.<ref>{{Cite web |last=Cunningham |first=Andrew |date=2022-06-02 |title=Have an old iPad lying around? You might be able to make it run Linux soon |url=https://arstechnica.com/gadgets/2022/06/developers-get-linux-up-and-running-on-old-ipad-air-2-hardware/ |access-date=2022-06-14 |website=Ars Technica |language=en-us}}</ref><ref>{{Cite web |title=Ein Jahr Arbeit: Tüftler bringen Linux auf das iPad Air 2 |url=https://www.derstandard.de/story/2000136457167/ein-jahr-arbeit-tueftler-bringen-linux-auf-das-ipad-air |access-date=2022-06-15 |website=[[Der Standard]] |language=de-AT}}</ref>
 
== iPhone devices ==
In 2008, Linux kernelthe [[Linux_kernel_version_history#Releases_2.6.x.y|2.6 Linux kernel]] was ported to the [[iPhone 3G]], the [[iPhone (1st generation)]], and the [[iPod Touch (1st generation)]] using [[OpeniBoot]].<ref>{{Cite web |last1=Yam |first1=Marcus |last2=publishedNgai |first2=Amos Ngai |date=2008-12-02 |title=iPhone Hacked to Run Linux |url=https://www.tomsguide.com/us/iPhone-3G-Apple-linux-jailbreak,news-3061.html |access-date=2022-06-14 |website=[[Tom's Guide]] |language=en}}</ref>
 
Corellium's Project Sandcastle made it possible to run Android on an [[iPhone 7]]/7+ or an [[iPod Touch (7th generation)]] using the checkra1ncheckm8 exploit.<ref>{{Cite web |title=Run Android on an iPhone With 'Project Sandcastle' Jailbreaking Tool |url=https://www.pcmag.com/news/run-android-on-an-iphone-with-project-sandcastle-jailbreaking-tool |access-date=2022-06-14 |website=PCMAG |language=en}}</ref>
 
== iPod devices ==
{{Main article|iPodLinux}}
iPodLinux is a Linux distribution created specifically to run on Apple's [[iPod]].
 
There is an experimental port of the mainline Linux kernel to iPod Nano 5G by [https://github.com/freemyipod/linux freemyipod/q3k].
== Mac ==
 
== Mac computers ==
 
=== Motorola 68k Macs ===
Linux can be [[Multi-booting|dual-booted]] on Macs that use [[Motorola 68000 series|Motorola 680x0]] processors<ref name="macworld-linux-on-68k-mac">{{Cite web |title=How to install Linux on a vintage 68K Mac |url=https://www.macworld.com/article/220967/how-to-install-linux-on-a-vintage-68k-mac.html |access-date=2022-06-14 |website=[[Macworld]] |language=en-US}}</ref> (only 68020 and higher,<ref>{{Cite web |titlename=How to install Linux on a vintage 68K Mac |url=https://www."macworld.com/article/220967/how-to-install-linux-on-a-vintage-68k-mac.html" |access-date=2023-04-01 |website=Macworld |language=en}}</ref> and only non-"EC" processor variants since an [[Memory management unit|MMU]] is required<ref name=":0">{{Cite web |title=Debian on Motorola 680x0 |url=https://www.debian.org/ports/m68k/index.en.html |access-date=2023-04-01 |website=Debian Ports}}</ref>). The ''Linux/mac68k'' community project provides resources to do so,<ref>{{Cite web |title=Linux/m68k for Macintosh |url=http://www.mac.linux-m68k.org/ |access-date=2023-04-01 |website=Linux/m68k for Mac}}</ref><ref name="MacOSXUnixGeeks">{{Cite book |last1=Rothman |first1=Ernest E. |url=https://books.google.com/books?id=S_OSYVXMAYUC |title=Mac OS X For Unix Geeks (Leopard): Demistifying the Geekier Side of Mac OS X |last2=Jepson |first2=Brian |last3=Rosen |first3=Rich |date=2008-09-18 |publisher=O'Reilly Media, Inc. |isbn=978-0-596-52062-5 |edition=4th |pages=174–187 |language=en}}</ref> and an m68k community port of the [[Debian]] Linux distribution is also available.<ref name=":0" /><ref name="MacOSXUnixGeeks" />
 
=== PowerPC Macs ===
In 1996, Apple announced that they were supporting a Linux port to the PowerMacs.<ref>{{Cite web |last=K. Johnson |first=Michael |date=May 1, 1996 |title=Stop The Presses |url=https://www.linuxjournal.com/article/1263 |access-date=2024-12-20 |website=[[Linux Journal]]}}</ref>
 
[[PowerPC]] Macs can run Linux through both [[Emulator|emulation]] and [[Multi-booting|dual-booting]] ("bare metal")<!-- what about virtualization? -->. The most popular PowerPC emulation tools for Mac OS/Mac OS X are Microsoft's [[Virtual PC]], and the open-source [[QEMU]].<ref name="MacOSXUnixGeeks" />
 
Line 80 ⟶ 31:
 
* [[Gentoo Linux|Gentoo]]<ref name="MacOSXUnixGeeks" />
* Debian<ref name="MacOSXUnixGeeks" /> (until Debian 8,<ref>{{Cite web |title=Debian for PowerPC |url=https://www.debian.org/ports/powerpc/index.en.html |access-date=2023-04-01 |website=Debian Ports}}</ref> revived shortly after as a Sid community port<ref>https://cdimage.debian.org/cdimage/ports/</ref>) <!--really terrible horrible thing to use as a citation but it is the download mirror that has updated Debian Sid 12 images on PowerPC, their official docs are out of date though and don't reflect this-->
* [[Ubuntu]]<ref name="MacOSXUnixGeeks" /> (until Ubuntu 16.10<ref>{{Cite web |title=PowerPCFaq |url=https://wiki.ubuntu.com/PowerPCFAQ |access-date=2023-04-01 |website=Ubuntu Wiki}}</ref><ref>{{Cite web |title=Ubuntu: A follow-up on 32-bit powerpc architecture [LWN.net] |url=https://lwn.net/Articles/717495/ |access-date=2023-04-01 |website=LWN}}</ref>)
* [[Fedora Linux|Fedora]]<ref name="MacOSXUnixGeeks" /> (until Fedora 17 for G3 and G4 processors, and Fedora 28 for G5<ref>{{Cite web |title=Architectures/PowerPC |url=https://fedoraproject.org/wiki/Architectures/PowerPC |access-date=2023-04-01 |website=Fedora Wiki}}</ref>)
* [[Yellow Dog Linux]]<ref name="MacOSXUnixGeeks" /> (discontinued in 2009<ref>{{Cite web |title=DistroWatch.com: Yellow Dog Linux |url=https://distrowatch.com/table.php?distribution=yellowdog |access-date=2023-04-01 |website=DistroWatch}}</ref>)
 
All of the above PowerPC ports have since been discontinued, except for Gentoo.<!-- Iffy use of primary citations, but it's better than misleading readers, providing info that's 15 years out of date, or being recentist and only adding current stuff. --> and Debian (official support ended in Debian 8)
 
=== Intel Macs ===
Line 91 ⟶ 42:
 
In 2010, Whitson Gordon from Lifehacker noted that Apple has streamlined the process of dual booting Windows on Macs, but not for Linux. [[rEFIt]] made it possible to dual boot Linux.<ref>{{Cite web |date=2010-05-05 |title=How to Triple-Boot Your Mac with Windows and Linux, No Boot Camp Required |url=https://lifehacker.com/how-to-triple-boot-your-mac-with-windows-and-linux-no-5531037 |access-date=2022-06-14 |website=Lifehacker |language=en-us}}</ref>
 
Macs which utilize the T2 chip from 2018 can run Linux distributions natively using the T2Linux project.<ref>{{cite web |url=https://wiki.t2linux.org/ |title=Home - t2linux wiki}}</ref>
 
=== Apple silicon Macs ===
Macs with [[Apple silicon]] processors can run Linux through the [[Asahi Linux]] command line installer for certain distributions including Fedora, Debian, and Ubuntu. While most features are available, some are unavailable on certain silicon processors and devices.<ref>{{cite web |title=Feature Support |url=https://github.com/AsahiLinux/docs/wiki/Feature-Support |website=GitHub |access-date=1 January 2024}}</ref>
The [[Asahi Linux]] project is porting Linux to the [[Apple M1|M1]] (and up) based [[system on a chip|SoCs]]. Asahi Linux is currently available as an incomplete preview.<ref>{{Cite web |last=Purdy |first=Kevin |date=2023-02-27 |title=Linux is not exactly "ready to run" on Apple silicon, but give it time |url=https://arstechnica.com/gadgets/2023/02/linux-is-not-exactly-ready-to-run-on-apple-silicon-but-give-it-time/ |access-date=2023-04-01 |website=Ars Technica |language=en-us}}</ref>
 
== See also ==
* [[iBoot]]
* [[Cydia]]
* [[MkLinux]]
* [[Linux range of use]]
* [[OtherOS]]
Line 109 ⟶ 63:
* {{Webarchive|url=https://web.archive.org/web/20080323104004/http://www.kernelthread.com:80/mac/vpc/|date=March 23, 2008|title=Amit Singh's "Many Systems on a PowerBook" article}}
 
{{Apple Inc.}}{{Apple-stub}}
{{Linux-stub}}
 
[[Category:Apple Inc.]]
[[Category:Linux kernel]]