將下面代碼保存為于虛擬機(jī)同樣的名詞,執(zhí)行腳本即可啟動
> cat /usr/local/bin/kali
#!/bin/bash
run_system()
{
local file=`basename $0`
local system=${file%.*}
echo "===== start to run ${system} ..."
prlctl start "${system}" && \
open "/Applications/Parallels Desktop.app"
}
run_system
如:
> kali
===== start to run kali ...
Starting the VM...
The VM has been successfully started.
> kali
===== start to run kali ...
Starting the VM...
The VM has been successfully started.