Learn to Manage VM in 5 mins with Vagrant up !

VM Folder

vagrant-folder
|__ Vagrantfile
|__ other_file_1
|__ other_file_2
|__ other_file_3

Up, Connect, Suspend, Halt, Destroy

$ vagrant up
$ vagrant ssh // connect to VM
$ vagrant suspend // pause
$ vagrant halt // shutdown
$ vagrant destroy // remove VM and stuff inside

Startup script

config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y apache2
++ echo "<h1>hello</h1>" > /var/www/html/index.html
SHELL
$ vagrant reload --provision

Access from Host Machine

config.vm.network "forwarded_port", guest: 80, host: 8080

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store