Virtual Machine with Vagrant

  1. Download and Install Tools

  2. Get the Linux Box from Vagrant Cloud

    • Visit Vagrant Cloud to find a suitable Linux box. Alternatively, you can add a Linux box directly using the command line:
      vagrant box add [box_name]
      
      Replace [box_name] with the name of the Linux box you want to use.
  3. Initialize Vagrant Environment

    • Initialize the VM with the following command:
      vagrant init [box_name]
      
      Again, replace [box_name] with the name of your chosen box.
  4. Start the Virtual Machine

    • Start the VM with:
      vagrant up
      
  5. Check Installed Linux Box Version

    • To check the installed Linux version and other boxes, use:
      vagrant box list
      
  6. Connect to VM

    • Connect to your VM via SSH using:
      vagrant ssh
      
  7. Disconnect to VM

    • suspend the VM
      vagrant suspend
      
    • resume from suspend
      vagrant resume
      
    • shutdown the VM
      vagrant halt