Hope that you have installed vagrant and virtualbox in your computer.
Below are steps on how to use vagrant command to run linux os on virtualbox
Steps:
1. Open powershell in windows or open git bash command prompt
2. Navigate to your project folder
Eg cd c:\vms
3. Run init command to create vagrant file and configuration file
vagrant init bento/ubuntu-16.04
Note: I want to install ubuntu-16.04. So i have chose bento/ubuntu-16.04
If you want other linux flavours like centos search in https://app.vagrantup.com and replace appropriately. Eg centos/7
4. Below command will power on the virtual machine.
vagrant up
Note: For the first time this command downloads the image from Internet.
5. Once VM is on you can ssh the VM using below command
vagrant ssh
Note: By default, user is vagrant and password is vagrant. You can switch to root user using sudo su -
Comments
Post a Comment