{"id":74152,"date":"2025-07-15T21:00:31","date_gmt":"2025-07-15T13:00:31","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=74152"},"modified":"2025-07-14T20:41:43","modified_gmt":"2025-07-14T12:41:43","slug":"how-to-run-linux-on-macos","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/","title":{"rendered":"3 Ways to Run Linux in macOS"},"content":{"rendered":"<p>If you\u2019re a <a href=\"https:\/\/www.hongkiat.com\/blog\/macos-developers-tools\/\">developer on a Mac<\/a>, you might find yourself needing a real Linux environment. While macOS shares some similarities with Linux, it doesn\u2019t always match the environments, the tools, or behavior of a true Linux system.<\/p>\n<p>Running Linux on your Mac helps make your setup more like the servers where your apps or websites will eventually live, which means fewer surprises when you deploy your work.<\/p>\n<p>In this article, we\u2019ll explore three easy ways to bring Linux into your Mac workflow which can help you build, test, and experiment more efficiently right from your Mac.<\/p>\n<p>Without further ado, let\u2019s check it out.<\/p>\n<hr>\n<h2>1. Using Docker Container<\/h2>\n<p><strong>Docker<\/strong> is a popular tool that brings containerization into your macOS. It allows you bundle your app and everything it needs like libraries and settings into something called a \u201ccontainer\u201d. This container ensures your app runs the same way everywhere, whether it\u2019s on your macOS or on a server.<\/p>\n<h3>Installation<\/h3>\n<p>To install Docker on your macOS, you\u2019ll first need to make sure that system meets the basic requirements; you\u2019ll need macOS 10.15 (Catalina) or newer, and at least 4 GB of RAM. Although I think it\u2019ll be better to get 8 GB or more for the better performance.<\/p>\n<p>Then, <a href=\"https:\/\/docs.docker.com\/desktop\/setup\/install\/mac-install\/\" target=\"_blank\" rel=\"noopener noreferrer\">get the <code>.dmg<\/code> file from the Docker site<\/a>. Be sure to choose the version that matches your Mac\u2019s processor, Apple Silicon or Intel.<\/p>\n<p>Once downloaded, open the <code>.dmg<\/code> file and follow the installation instruction.<\/p>\n<p>After the installation is complete, you confirm everything is working by running the following command in Terminal:<\/p>\n<pre>\r\ndocker --version\r\n<\/pre>\n<p>If you see a version number, you\u2019re all set!<\/p>\n<figure>\n        <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/how-to-run-linux-on-macos\/docker-version-check.jpg\" alt=\"Docker version check in Terminal\" width=\"1000\" height=\"420\">\n    <\/figure>\n<h3>Running a Linux Container<\/h3>\n<p>Let\u2019s say you want to use Docker to run a Linux environment (like Ubuntu), and you also want the container to have access to a folder from your macOS, maybe to run files or apps.<\/p>\n<p>You can do this by mounting a directory using the <code>-v<\/code> flag. For example:<\/p>\n<pre>\r\ndocker run -it -v ~\/Projects:\/workspace ubuntu:latest \/bin\/bash\r\n<\/pre>\n<p>This command will first download <strong>the latest Ubuntu image<\/strong> (if you don\u2019t already have it) and then start an interactive command line inside the container.<\/p>\n<p>At this point, you are effectively \u201cinside\u201d a Linux environment, ready to type Linux commands.<\/p>\n<figure>\n        <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/how-to-run-linux-on-macos\/ubuntu-shell.jpg\" alt=\"Ubuntu Linux shell in Docker\" width=\"1000\" height=\"600\">\n    <\/figure>\n<p>Instead of using the <code>latest<\/code> tag, it is generally recommended to use a specific version of the image, like <code>ubuntu:20.04<\/code>, to ensure consistency in your environment. You can replace <code>latest<\/code> with any specific version you need, for example:<\/p>\n<pre>\r\ndocker run -it -v ~\/Sites\/hkdc\/ubuntu:\/workspace ubuntu:20.04 \/bin\/bash\r\n<\/pre>\n<p>We can check the version and can confirm that we are now running Ubuntu version <strong>20.04<\/strong>.<\/p>\n<figure>\n        <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/how-to-run-linux-on-macos\/ubuntu-shell-20.jpg\" alt=\"Ubuntu 20.04 running in Docker\" width=\"1000\" height=\"600\">\n    <\/figure>\n<p>Now, that we\u2019ve run Linux using Docker, let\u2019s see an alternative way.<\/p>\n<hr>\n<h2>2. Using OrbStack<\/h2>\n<p><strong><a href=\"https:\/\/orbstack.dev\" target=\"_blank\" rel=\"noopener noreferrer\">OrbStack<\/a><\/strong> is a newer, faster alternative to Docker Desktop, made for macOS. Aside of a Docker container, OrbStack is also capable of running a lightweight virtual machine to run Linux.<\/p>\n<p>Let\u2019s see how this works.<\/p>\n<h3>Installation<\/h3>\n<p>First, we are going to install OrbStack.<\/p>\n<p>The easiest and best way to install OrbStack on macOS is by using <a href=\"https:\/\/formulae.brew.sh\/cask\/\" target=\"_blank\" rel=\"noopener noreferrer\">Homebrew Cask<\/a>. You can open your Terminal app and type this command:<\/p>\n<pre>\r\nbrew install --cask orbstack\r\n<\/pre>\n<p>Or, download the installer file <a href=\"https:\/\/orbstack.dev\/download\" target=\"_blank\" rel=\"noopener noreferrer\">from the website<\/a>.<\/p>\n<h3>Running Linux VM<\/h3>\n<p>OrbStack support various Linux distros that you can run, including Ubuntu, Debian, OpenSuse, and even <a href=\"https:\/\/archlinux.org\" target=\"_blank\" rel=\"noopener noreferrer\">Arch<\/a>.<\/p>\n<p>To create these Linux virtual machines, you can open the OrbStack app, pick your favorite Linux version, and create a new machine using the visual interface.<\/p>\n<figure>\n        <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/how-to-run-linux-on-macos\/orbstack-vm-install.jpg\" alt=\"OrbStack Linux VM installation interface\" width=\"1000\" height=\"600\">\n    <\/figure>\n<p>Or, you can do it automatically using the command line:<\/p>\n<pre>\r\norb create ubuntu local-ubuntu-vm\r\n<\/pre>\n<p>This will create the VM with the latest Ubuntu version, in this case, it\u2019s <a href=\"http:\/\/\" target=\"_blank\" rel=\"noopener noreferrer\">Plucky Puffin<\/a>. It\u2019s a non-LTS version, so you might want to use a specific version like <code>24.04 (Noble)<\/code> or <code>22.04 (Jammy)<\/code> instead.<\/p>\n<p>To install specific version, for example 24.04 (Noble), you can use the following command:<\/p>\n<pre>\r\norb create ubuntu:noble local-ubuntu-vm\r\n<\/pre>\n<h3>OrbStack Commands<\/h3>\n<p>One of the things, that I like from VM in OrbStack is that it comes with the commands built in and integrated with the SSH configuration in your macOS. This means you can easily SSH into your VM without needing to set up anything else.<\/p>\n<p>To SSH-in to the VM that we\u2019ve just created, <code>local-ubuntu-vm<\/code>, you can simply run the following command in your Terminal:<\/p>\n<pre>\r\nssh local-ubuntu-vm@orb\r\n<\/pre>\n<p>One my favourite is that OrbStack automatically mount your macOS directory in <code>\/mnt\/mac<\/code>, and already configured with proper permission, something that can be often a hassle in Docker.<\/p>\n<figure>\n        <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/how-to-run-linux-on-macos\/orbstack-vm-ssh-in-ls.jpg\" alt=\"OrbStack SSH terminal directory listing\" width=\"1000\" height=\"600\">\n    <\/figure>\n<p>Now, you can run any Linux commands, install packages, or even run your apps inside the VM.<\/p>\n<hr>\n<h2>3. Using LimaVM<\/h2>\n<p><strong><a href=\"https:\/\/lima-vm.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">Lima<\/a><\/strong>, which stands for <strong>\u201cLInux MAchine\u201d<\/strong>, provides a simple way to run lightweight Linux VM directly on your macOS.<\/p>\n<p>Let\u2019s see how to install it and how it works.<\/p>\n<h3>Installation<\/h3>\n<p>The easiest and most common way to install Lima on macOS is using <a href=\"https:\/\/lima-vm.io\/\" target=\"_blank\" rel=\"noopener noreferrer\">Homebrew<\/a>. You can open your Terminal and type this command:<\/p>\n<pre>\r\nbrew install lima\r\n<\/pre>\n<p>Then, you can run the following command to check if it\u2019s installed correctly:<\/p>\n<pre>\r\nlimactl --version\r\n\/\/ Or, just \r\nlima --version\r\n<\/pre>\n<h3>Running up a Linux VM<\/h3>\n<p>Lima works with many different versions of Linux, letting you pick the environment that best fits what you need. To see a list of available options of the Linux distros you can run with Lima, you can use this command:<\/p>\n<pre>\r\nlimactl start --list-templates\r\n<\/pre>\n<p>Lima supports various distros which includes Ubuntu, Debian, Fedora, and even Docker and <a href=\"https:\/\/podman.io\" target=\"_blank\" rel=\"noopener noreferrer\">Podman<\/a>.<\/p>\n<figure>\n        <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/how-to-run-linux-on-macos\/lima-list-templates.jpg\" alt=\"Lima VM Linux templates list\" width=\"1000\" height=\"600\">\n    <\/figure>\n<p>Let\u2019s try starting an Ubuntu VM like in our previous examples, using the following command:<\/p>\n<pre>\r\nlimactl start default\r\n<\/pre>\n<p>Once the VM installation is done, you can just run the following to SSH-in the VM:<\/p>\n<pre>\r\nlima\r\n\/\/ Or\r\nlimactl shell default\r\n<\/pre>\n<h3>Installing specific Ubuntu version<\/h3>\n<p>By default, <strong>Lima<\/strong> will create the VM with the latest LTS version of Ubuntu. If you want to install a specific version of Ubuntu, you can use the following command:<\/p>\n<pre>\r\nlimactl start ubuntu-20.04 template:\/\/ubuntu-20.04\r\n<\/pre>\n<p>To SSH-in the ubuntu-20.04 VM, you can run:<\/p>\n<pre>\r\nlimactl shell ubuntu-20.04\r\n<\/pre>\n<p>One thing that I like about Lima is that it automatically shares files between macOS and the Linux VM. This file sharing in Lima is also as fast as if it were in your macOS machine.<\/p>\n<p>You can find your macOS home directory in <code>\/Users\/&lt;username&gt;<\/code> inside the VM.<\/p>\n<figure>\n        <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/how-to-run-linux-on-macos\/lima-ll-home-dir.jpg\" alt=\"Lima VM home directory contents\" width=\"1000\" height=\"300\"><figcaption>Listing the home directory in Lima VM<\/figcaption><\/figure>\n<hr>\n<h2>Wrapping up<\/h2>\n<p>Choosing the best way to run Linux on your Mac depends on what you need, how comfortable you are using the command line, and how powerful your Mac is.<\/p>\n<p>Docker, OrbStack, and Lima each offer different benefits: Docker is great for running apps in containers, Lima is better for full Linux virtual machines, and OrbStack does both in a fast and efficient way. Instead of asking which one is better overall, think about which one suits your needs best.<\/p>\n<p>So to help you decide, we\u2019ve included a table that compares all three tools side by side, making it easier to see their pros and cons at a glance.<\/p>\n<table>\n<thead>\n<tr>\n<th>Feature<\/th>\n<th>Docker<\/th>\n<th>OrbStack<\/th>\n<th>Lima<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th>Primary Use Case<\/th>\n<td>Containerization<\/td>\n<td>Lightweight Container\/VM<\/td>\n<td>Full Linux VM<\/td>\n<\/tr>\n<tr>\n<th>OS Supports<\/th>\n<td>Windows, macOS<\/td>\n<td>macOS<\/td>\n<td>Windows (untested), macOS, Linux<\/td>\n<\/tr>\n<tr>\n<th>Filesystem<\/th>\n<td>Docker Volumes<\/td>\n<td>Shared Folders<\/td>\n<td>Shared Folders<\/td>\n<\/tr>\n<tr>\n<th>GUI<\/th>\n<td>Yes<\/td>\n<td>Yes<\/td>\n<td>No (Only CLI)<\/td>\n<\/tr>\n<tr>\n<th>Kubernetes Support<\/th>\n<td>Yes<\/td>\n<td>Yes (<a href=\"https:\/\/k3s.io\" target=\"_blank\" rel=\"noopener noreferrer\">k3s<\/a>)<\/td>\n<td>Yes (with templates <a href=\"https:\/\/github.com\/lima-vm\/lima\/tree\/master\/templates\/k3s.yaml\" target=\"_blank\" rel=\"noopener noreferrer\">k3s<\/a>, <a href=\"https:\/\/github.com\/lima-vm\/lima\/blob\/master\/templates\/k8s.yaml\" target=\"_blank\" rel=\"noopener noreferrer\">k8s<\/a>)<\/td>\n<\/tr>\n<tr>\n<th>Cost<\/th>\n<td>Free with Paid for Commercial Use<\/td>\n<td>Free with Paid for Commercial Use<\/td>\n<td>Free<\/td>\n<\/tr>\n<\/tbody>\n<\/table>","protected":false},"excerpt":{"rendered":"<p>If you\u2019re a developer on a Mac, you might find yourself needing a real Linux environment. While macOS shares some similarities with Linux, it doesn\u2019t always match the environments, the tools, or behavior of a true Linux system. Running Linux on your Mac helps make your setup more like the servers where your apps or&hellip;<\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3397],"tags":[888],"topic":[],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>3 Ways to Run Linux in macOS - Hongkiat<\/title>\n<meta name=\"description\" content=\"If you&#039;re a developer on a Mac, you might find yourself needing a real Linux environment. While macOS shares some similarities with Linux, it doesn&#039;t\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"3 Ways to Run Linux in macOS\" \/>\n<meta property=\"og:description\" content=\"If you&#039;re a developer on a Mac, you might find yourself needing a real Linux environment. While macOS shares some similarities with Linux, it doesn&#039;t\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-15T13:00:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/how-to-run-linux-on-macos\/docker-version-check.jpg\" \/>\n<meta name=\"author\" content=\"Thoriq Firdaus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tfirdaus\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoriq Firdaus\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-run-linux-on-macos\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-run-linux-on-macos\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\"3 Ways to Run Linux in macOS\",\"datePublished\":\"2025-07-15T13:00:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-run-linux-on-macos\\\/\"},\"wordCount\":1136,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-run-linux-on-macos\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/how-to-run-linux-on-macos\\\/docker-version-check.jpg\",\"keywords\":[\"Linux\"],\"articleSection\":[\"Desktop\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-run-linux-on-macos\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-run-linux-on-macos\\\/\",\"name\":\"3 Ways to Run Linux in macOS - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-run-linux-on-macos\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-run-linux-on-macos\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/how-to-run-linux-on-macos\\\/docker-version-check.jpg\",\"datePublished\":\"2025-07-15T13:00:31+00:00\",\"description\":\"If you're a developer on a Mac, you might find yourself needing a real Linux environment. While macOS shares some similarities with Linux, it doesn't\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-run-linux-on-macos\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-run-linux-on-macos\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-run-linux-on-macos\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/how-to-run-linux-on-macos\\\/docker-version-check.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/how-to-run-linux-on-macos\\\/docker-version-check.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/how-to-run-linux-on-macos\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"3 Ways to Run Linux in macOS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\",\"name\":\"Thoriq Firdaus\",\"description\":\"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.\",\"sameAs\":[\"https:\\\/\\\/thoriq.com\",\"https:\\\/\\\/x.com\\\/tfirdaus\"],\"jobTitle\":\"Web Developer\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/thoriq\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"3 Ways to Run Linux in macOS - Hongkiat","description":"If you're a developer on a Mac, you might find yourself needing a real Linux environment. While macOS shares some similarities with Linux, it doesn't","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/","og_locale":"en_US","og_type":"article","og_title":"3 Ways to Run Linux in macOS","og_description":"If you're a developer on a Mac, you might find yourself needing a real Linux environment. While macOS shares some similarities with Linux, it doesn't","og_url":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2025-07-15T13:00:31+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/how-to-run-linux-on-macos\/docker-version-check.jpg","type":"","width":"","height":""}],"author":"Thoriq Firdaus","twitter_card":"summary_large_image","twitter_creator":"@tfirdaus","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Thoriq Firdaus"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":"3 Ways to Run Linux in macOS","datePublished":"2025-07-15T13:00:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/"},"wordCount":1136,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/how-to-run-linux-on-macos\/docker-version-check.jpg","keywords":["Linux"],"articleSection":["Desktop"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/","url":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/","name":"3 Ways to Run Linux in macOS - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/how-to-run-linux-on-macos\/docker-version-check.jpg","datePublished":"2025-07-15T13:00:31+00:00","description":"If you're a developer on a Mac, you might find yourself needing a real Linux environment. While macOS shares some similarities with Linux, it doesn't","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/how-to-run-linux-on-macos\/docker-version-check.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/how-to-run-linux-on-macos\/docker-version-check.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/how-to-run-linux-on-macos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"3 Ways to Run Linux in macOS"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807","name":"Thoriq Firdaus","description":"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.","sameAs":["https:\/\/thoriq.com","https:\/\/x.com\/tfirdaus"],"jobTitle":"Web Developer","url":"https:\/\/www.hongkiat.com\/blog\/author\/thoriq\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-ji0","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/74152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=74152"}],"version-history":[{"count":1,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/74152\/revisions"}],"predecessor-version":[{"id":74153,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/74152\/revisions\/74153"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=74152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=74152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=74152"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=74152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}