{"id":13510892,"url":"https://github.com/karton/karton","last_synced_at":"2025-04-09T12:08:51.844Z","repository":{"id":17098871,"uuid":"81131029","full_name":"karton/karton","owner":"karton","description":"Karton - Run Linux programs on macOS, a different Linux distro, or a different architecture","archived":false,"fork":false,"pushed_at":"2022-07-05T07:17:04.000Z","size":302,"stargazers_count":171,"open_issues_count":8,"forks_count":13,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-02T10:12:49.233Z","etag":null,"topics":["centos","docker","fedora","linux","macos","ubuntu"],"latest_commit_sha":null,"homepage":"https://karton.github.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karton.png","metadata":{"files":{"readme":"README.md","changelog":"changelog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-06T20:38:55.000Z","updated_at":"2025-03-13T17:06:35.000Z","dependencies_parsed_at":"2022-08-07T08:15:47.040Z","dependency_job_id":null,"html_url":"https://github.com/karton/karton","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karton%2Fkarton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karton%2Fkarton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karton%2Fkarton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karton%2Fkarton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karton","download_url":"https://codeload.github.com/karton/karton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036067,"owners_count":21037092,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["centos","docker","fedora","linux","macos","ubuntu"],"created_at":"2024-08-01T02:01:58.334Z","updated_at":"2025-04-09T12:08:51.825Z","avatar_url":"https://github.com/karton.png","language":"Python","readme":"\u003cimg align=\"right\" src=\"https://karton.github.io/img/karton-256.png\" width=\"96px\" height=\"96px\"\u003e\n\n[[Web site](https://karton.github.io/)] \u0026ndash; [[Install](https://karton.github.io/install.html)] \u0026ndash; [[How to use](https://karton.github.io/how-to-use.html)] \u0026ndash; [[FAQ](https://karton.github.io/faq.html)] \u0026ndash; [[Contribute](https://karton.github.io/contribute.html)]\n\nKarton\n======\n\nKarton is a tool to transparently run Linux programs on macOS or on another Linux distro.\n\n``` sh\n$ uname -a # Show we are running on macOS.\nDarwin my-hostname 16.4.0 Darwin Kernel Version 16.4.0 [...]\n\n$ # Run the compiler in the Ubuntu image we use for work\n$ # (which we called \"ubuntu-work\"):\n$ karton run ubuntu-work gcc -o test_linux test.c\n\n$ # Verify that the program is actually a Linux one.\n$ # The files are shared and available both on your\n$ # system and in the image:\n$ file test_linux\ntest_linux: ELF 64-bit LSB executable, x86-64, [...]\n\n$ # Same thing but on 32-bit ARMv7 (in the image we\n$ # called \"ubuntu-work-arm\"):\n$ karton run ubuntu-work-arm gcc -o test_arm test.c\n$ file test_arm\ntest_arm: ELF 32-bit LSB executable, ARM, EABI5 [...]\n\n$ # We can run the ARM program:\n$ karton run ubuntu-work-arm ./test_arm\n[... Output of our program ...]\n```\n\nIn another terminal you can attach to the running program and debug it.\n\n``` sh\n$ # Find the PID of the test_arm program.\n$ karton run ubuntu-work-arm ps aux | grep test_arm\ntest_arm    42  [...]  test_arm\n\n$ # Debug it!\n$ karton run ubuntu-work-arm gdb --pid 42\nGNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1\nCopyright (C) 2016 Free Software Foundation, Inc.\n[...]\nAttaching to process 11\n[...]\n0x00007f53430e4740 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:84\n84\t../sysdeps/unix/syscall-template.S: No such file or directory.\n(gdb)\n```\n\nIn the example, by prefixing your commands with `karton run ubuntu`, you can run them on Ubuntu even if you are using macOS (or another Linux distro!). Files are shared across the two operating systems and executing commands like this is very fast, making the whole experience smooth.\n\nKarton uses Docker 🐳 to create a semi-permanent container where all the commands are executed. The management of this container is transparent to the user, who doesn't need to worry about the Docker-related details.\u003cbr\u003e\nKarton images can also be easily configured to share files or directory with your host system.\n","funding_links":[],"categories":["Python","ubuntu"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarton%2Fkarton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarton%2Fkarton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarton%2Fkarton/lists"}