# VirtualBox Guest 安裝與設定指引

# 安裝

  1. Install ArchLinux kernel headers
sudo pacman -S linux-headers
1
  1. Check version of Linux Kernel
uname -r
1
  1. Install VirtualBox Guest utilities with X support
sudo pacman -S virtualbox-guest-utils
1

# 設定

  1. Enable VirtualBox Service
sudo systemctl enable vboxservice
1
  1. Start VirtualBox Service started
sudo systemctl start vboxservice
sysemctl status vboxservice
1
2
  1. Add user account to vboxsf group
sudo usermod -aG vboxsf alanjui
grep vboxsf /etc/group
1
2
  1. Reboot system.
sudo reboot
1

# 驗證

  1. Verify VirtualBox Service has been started.

    systemctl status vboxservice
    
    1
  2. Share clipboard enabled.

    (1) Configure shared clipboard: Select command: VirtualBox VM / Devices / Share Clipboard / Bidirectional

    (2) Verify copy from host: copy command and paste to guest terminal.

    • copy command text on macOS.
    • open terminal on Manjaro-KDE and press [Ctrl] + [Shift] + [V] keys to paste command from Host Clipboard to Guest Terminal.

    (3) Verfify paste to host: copy text from guest and paste to host.

    • copy text on guest(Manjaro-KDE).
    • paste text to terminal on host(macOS).
  3. Share folder enabled.

    (1) Create folder to be mount to host

    cd
    mkdir -p ~/host
    
    1
    2

    (2) Configure shared folders:

    Select command: VirtualBox VM / Devices / Shared Folders Settings:

    • Folder Path: /Users/alanjui
    • Folder Name: vboxsf [v] Auto-mount
    • Mount point: /home/alanjui/host [v] Make Permanent

    (3) Verify

    ls -la ~/host
    
    1

# 參考

VirtualBox/Install Arch Linux as a guest (opens new window)