Installing Laravel Using Homestead

Software instlations on system

  • virtualbox
  • vagrant
  • php
  • composer
  • git
  • vscode
vagrant box add laravel/homestead
git clone ~/Homestead
cd ~/Homestead
git checkout release
code Homestead.yml

Edit the opened file with the help of this

Create New Project of Laravel

composer create-project --prefer-dist laravel/laravel testing

Create ssh Key

ssh-keygen -t rsa -C ""

ssh into Vagrant

vagrant ssh

Script for Installing phpmyadmin

curl -sS | sh

Credentials for phpmyadmin

user name = root

password = secret

Add Host names for projects

sudo nano /etc/hosts   project1.test   testing.test

Vagrant Commands

Start Homestead Machine

vagrant up

Anychange in Homestead.yml file run the following command

vagrant reload --provision

vagrant status

The VM is running. To stop this VM, you can run vagrant halt to shut it down forcefully, or you can run vagrant suspend to simply suspend the virtual machine. In either case, to restart it again, simply run vagrant up.

vagrant global-status
vagrant destroy 1a2b3c4d


  1. When vagrant machine is not shutdown and computer restarted run the following…
    vagrant reload --provision


sudo nano /etc/nfsmount.conf

Find the section with # Protocol Version [2,3,4]. And look for # Defaultvers= line.

Now uncomment the Defaultvers line and set it to 3 like below.