Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP
run Linux on Yosemite easily from the CLI
JavaScript Shell
Branch: master

2.5.0

latest commit c68d9e8a95
@mafintosh mafintosh authored
Failed to load latest commit information.
.gitignore rsa key generation
.npmignore update npmignore
.travis.yml badges
cli.js support --tty in run
download.js update to hypercore 2.1.0
get-ip.sh readme, ssh
package.json 2.5.0
readme.md mention dat in readme
xhyve add fuse and xhyve

readme.md

linux

beta software! proceed with caution

npm installs hypercore linux (based on tiny core linux) and runs it as a daemon using the new Mac OS Yosemite hypervisor (via xhyve).

This module is a low level component that is part of HyperOS, made by the team working on the Dat data version control tool. We are working on integrating the other HyperOS components to support advanced functionality like running containers, sharing filesystems etc.

Mac OS Yosemite only for now, Windows support coming later through Hyper-V integration (see this issue if you wanna help)

WARNING

  • xhyve is a very new project, expect bugs! You must be running OS X 10.10.3 Yosemite or later and 2010 or later Mac for this to work.
  • if you happen to be running any version of VirtualBox prior to 4.3.30 or 5.0 then xhyve will crash your system either if VirtualBox is running or had been run previously after the last reboot (see xhyve's issues #5 and #9 for the full context). So, if you are unable to update VirtualBox to version 4.3.30 or 5, or later, and were using it in your current session please do restart your Mac before attempting to run xhyve.
  • (these warnings were borrowed from coreos-xhyve)

js-standard-style Build Status dat

installation

npm install linux -g

usage

Quickstart:

  1. Run linux init in a folder where you want to store your linux runtime config
  2. Run sudo linux boot to start the local linux server daemon
  3. Run linux ssh to log in to the server daemon over ssh
  4. Run linux halt to stop the server daemon when you're done
$ linux
Usage:     linux <command> [args...]

Commands:
  init     creates a new ./linux folder in this directory to hold config
  boot     boots up linux from config in ./linux
  status   checks if linux is running or not
  ssh      sshes into linux and attaches the session to your terminal
  run      runs a single command over ssh
  halt     runs sudo halt in linux, initiating a graceful shutdown
  kill     immediately ungracefully kills the linux process with SIGKILL
  pid      get the pid of the linux process
  ps       print all linux processes running on this machine

example

# initialize a linux folder to hold state
$ linux init
Created new config folder at /Users/max/test/linux

# starts a linux daemon
$ sudo linux boot
Linux has booted { ip: '192.168.64.127',
  hostname: 'simon-mittens-snuggles-toby',
  pid: 20665 }

# ssh login
$ linux ssh
Warning: Permanently added '192.168.64.127' (ECDSA) to the list of known hosts.
 __    __    __
/  \__/  \__/  \__   Welcome to HyperOS Linux! (Based on TinyCore Linux)
\__/  \__/  \__/  \        hyperos.io              tinycorelinux.net
   \__/  \__/  \__/
tc@simon-mittens-snuggles-toby:~$ pwd
/home/tc
tc@simon-mittens-snuggles-toby:~$ exit
Connection to 192.168.64.127 closed.

# run a single command over ssh
$ linux run uname -a
Linux simon-mittens-snuggles-toby 3.16.6-tinycore64 #777 SMP Thu Oct 16 10:21:00 UTC 2014 x86_64 GNU/Linux

$ linux status
Linux is running { pid: 20665 }

# gracefully shutdown
$ linux halt

$ linux status
Linux is not running

special thanks

Something went wrong with that request. Please try again.