Skip to content

Instantly share code, notes, and snippets.

@nottrobin
Created July 1, 2020 08:37
Show Gist options
  • Select an option

  • Save nottrobin/8319aabd904830dd68cf1c146e30a496 to your computer and use it in GitHub Desktop.

Select an option

Save nottrobin/8319aabd904830dd68cf1c146e30a496 to your computer and use it in GitHub Desktop.

Revisions

  1. nottrobin created this gist Jul 1, 2020.
    11 changes: 11 additions & 0 deletions set-up-dotrun-macos.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    multipass launch --name dotrun
    DOTRUN_IP=$(multipass list | grep dotrun | egrep -o '\d+[.]\d+[.]\d+[.]\d+')
    multipass exec dotrun -- mkdir shared
    multipass exec dotrun -- chmod 777 shared
    multipass exec dotrun -- sudo apt update
    multipass exec dotrun -- sudo apt install --yes nfs-kernel-server
    multipass exec dotrun -- bash -c 'echo "$HOME/shared 192.168.64.0/24(rw,fsid=0,insecure,no_subtree_check,all_squash,async,anonuid=1000,anongid=1000)" | sudo tee -a /etc/exports'
    multipass exec dotrun -- sudo exportfs -a
    multipass exec dotrun -- sudo service nfs-kernel-server restart
    mkdir $HOME/shared
    sudo mount -t nfs $DOTRUN_IP:/home/ubuntu/shared \$HOME/shared