Setup Laravel 10.x Homestead in Windows 10/11

Section – 1 [Install Software]

https://laravel.com/docs/10.x/homestead#installation-and-setup

vagrant_2.3.7_windows_amd64.msi – https://developer.hashicorp.com/vagrant/downloads

VirtualBox-6.1.46-158378-Win.exe – https://www.virtualbox.org/wiki/Download_Old_Builds_6_1

VirtualBox 6.1.46 (released July 18 2023) << This and Not the >> VirtualBox 7.0.10 platform packages – ​Windows hosts

According to: https://laravel.com/docs/10.x/homestead#installation-and-setup

Code Editor/IDE: PhpStorm-2023.1.4.exe or VSCodeSetup-x64-1.80.1.exe

Lastly install: Git-2.41.0.3-64-bit.exe – https://git-scm.com/downloads

Section – 2 [ENABLE VT-x in Hardware/BIOS/UEFI if disabled]

http://leonidassavvides.com/blog/2023/07/23/enable-vt-x-in-hp-z640-workstation/

Section – 3 [Installing Homestead]

https://laravel.com/docs/10.x/homestead#installing-homestead

Go To CLI Terminal in IDE/Editor or Windows Terminal or Git Bash Terminal and execute:

git clone https://github.com/laravel/homestead.git D:\htdocs_xampp\Homestead

where D:\htdocs_xampp\Homestead the Homestead directory, after entering this directory:

d:
cd d:\htdocs_xampp\Homestead

Next, execute the bash init.bat command from the Homestead directory to create the Homestead.yaml configuration file. The Homestead.yaml file is where you will configure all of the settings for your Homestead installation. This file will be placed in the Homestead directory: if there is a problem with the

init.bat 

use

./init.bat

Section – 4 [Configuring Homestead]

Follow the instructions at:

https://laravel.com/docs/10.x/homestead#configuring-homestead

For configuring the file: Homestead.yaml

Section – 5 [Launching The Vagrant Box]

After all, the steps above, it is time to:

Launching The Vagrant Box

You must have in mind the 4 most used CLI commands FROM CLI/Terminal at d:\htdocs_xampp\Homestead\:

vagrant up # if error on this - please Section 6 below
vagrant status
vagrant suspend
vagrant ssh

Section – 6 [Configuring SSH Keys]

In case the first attempt of running:

vagrant up

you getting

Please give the command to generate ssh keys in Windows:

ssh-keygen -t rsa -C "username@email.com"

This will create the:

C:\Users\lwdls\.ssh\id_rsa.pub
C:\Users\lwdls\.ssh\id_rsa

Then you have to go to Homestead.yaml and edit the SSH Keys with the correct Keys you have just created:

authorize: C:\Users\lwdls.ssh\id_rsa.pub
keys:
     - C:\Users\lwdls.ssh\id_rsa

Then you return to Section – 5 and give the command: vagrant up

The first time you have to await some time to download the Vagrant VM – Ubuntu Server from the repositories…

After the VM OK is launched go to: http://homestead.test/phpinfo.php to see the webpage of phpinfo():

phpinfo.php

<?php
phpinfo();
?>

if any problem put the phpinfo.php

in

public/phpinfo.php

to stop the VM – shutdown the PC – give

vagrant suspend

To add additional sites:

Adding Additional Sites

https://laravel.com/docs/10.x/homestead#adding-additional-sites

To create a Laravel Site – start with download Laravel files with the:

https://laravel.com/docs/10.x/installation#your-first-laravel-project

At Terminal d:\htdocs_xampp\

composer create-project laravel/laravel example-laravel-app

Composer can be installed from:

https://getcomposer.org/download/

Also, the composer comes preinstalled in Homestead/Vagrant/VM

And, a second way is:

After:

vagrant up 

Give:

vagrant ssh

and from Terminal at /home/vagrant/ give the command:

 composer create-project laravel/laravel example-laravel-app

Any way you choose, be sure to edit the Homestead.yaml and every new website added to run:

vagrant reload --provision

And lastly

To run a new URL locally modify the host file at:

On macOS and Linux, this file is located at /etc/hosts. On Windows, it is located at C:\Windows\System32\drivers\etc\hosts:

192.168.56.56 homestead.test
192.168.56.56 another1.test
192.168.56.56 another2.test

Again, according to

Homestead.yaml

After, download the Laravel 10.x bootstrap code base, view the Laravel homepage accordingly by going to http://another1.test.

Happy Laravel Web Development & Coding…!

Useful Notes – Ubuntu/Ubuntu Studio 22.04 LTS “Jammy Jellyfish”

I use Ubuntu Studio 22.04 LTS “Jammy Jellyfish” because comes with many-many preinstalled Apps.

Main Things to do after installing Ubuntu Studio 22.04 LTS “Jammy Jellyfish”
========

I have chosen Ubuntu Studio 22.04 LTS because I do Graphic and Video Editing along with my main Programming work…
[Support: Ubuntu Studio 22.04 LTS (Jammy Jellyfish) will be supported for 3-years until April 2025.]
[Note: Ubuntu 22.04 LTS is supported for 5-years.] 
[Direct upgrades to Ubuntu Studio 22.04 from supported versions prior to 21.10 are not supported.]

Main Things To Do:

  1. Get your system ready with updates and repositories. Get familiar with auto-updates [Software & Updates, Software Center]
    sudo apt update && sudo apt upgrade
  2. Install applications of your choice from the software center, mainly Programming IDEs/Editors, because Content Creation Apps are come preinstalled already in Ubuntu Studio.  
    https://linuxconfig.org/things-to-install-on-ubuntu-20-04 
    [ COMPLETE GUIDE FOR MANY-MANY SOFTWARE Apps INSTALLATION ]
  3. Give your Ubuntu OS a different color [ Settings > Appearance ]
  4. Get familiar with the new screenshot tool. [ When you press the Print Screen button to take the screenshot, it opens the UI and gives you the option to take the screenshot of the selected area, entire screen, or current application window. ]
  5. Know about cleaning your system. The classic apt autoremove command is a good way to remove packages that are not required anymore. https://linuxhint.com/why_apt_get_clean/
    sudo apt autoremove
  6. Master the keyboard shortcuts
    Ctrl + Alt + T: Ubuntu terminal shortcut [instead of opening a terminal use Alt+F2 to run the console]
    Ctrl + Q: Close an application window
    Alt + Tab: Switch between running applications
    Super[Win] + Space: Change input keyboard e.g. En <->Ru
    Ctrl + Alt + arrow: Move between workspaces
    Ctrl + Alt + Del: Log out
    Go to Settings->Devices->Keyboard [for Custom Keyboard Shortcuts]
  7. OTHER SPECIAL THINGS OF INTEREST SEE BELOW

========
Other Special Things you will do, if you want it, by REFERENCES ONLINE:  
========
1-DUAL BOOT WINDOWS-LINUX   
https://www.freecodecamp.org/news/how-to-dual-boot-any-linux-distribution-with-windows/
2-UBUNTU AS VIRTUAL MACHINE IN VMWARE HYPERVISOR  
https://www.linuxvmimages.com/images/ubuntustudio-2204/
https://linuxconfig.org/install-vmware-tools-on-ubuntu-22-04-jammy-jellyfish-linux
3-HOW TO INSTALL STEAM ON UBUNTU 22.04 FOR GAMING ON LINUX   
https://linuxconfig.org/how-to-install-steam-on-ubuntu-16-04-xenial-xerus
4-DO NOT DISTURB MODE UBUNTU    
https://ur9r.com/how-to-use-do-not-disturb-mode-in-ubuntu-so-you-can-focus-on-your-work/  
5-INSTALLING DESKTOP ENVIRONMENTS  
https://linuxconfig.org/how-to-install-ubuntu-studio-desktop-environment-on-ubuntu-20-04
https://linuxconfig.org/ubuntu-20-04-cinnamon-desktop-installation
6-1-KEYBOARD SHORTCUTS   
https://help.ubuntu.com/stable/ubuntu-help/shell-keyboard-shortcuts.html.en
6-2-SET KEYBOARD SHORTCUTS   
https://help.ubuntu.com/stable/ubuntu-help/keyboard-shortcuts-set.html.en
6-3-SCREENCAST & SCREENSHOTS KEYBOARD SHORTCUTS   
https://help.ubuntu.com/stable/ubuntu-help/screen-shot-record.html

============

I major/critical advice from the Source of
========
Ubuntu & Ubuntu Studio – Linux: www.ubuntustudio.org for current-old users of Ubuntu Studio 20.04, about the upgrade to all new Ubuntu Studio 22.04 LTS, NOT TO DO SO… BUT DO INSTEAD A CLEAN INSTALL OF 22.04!!!
https://ubuntustudio.org/2022/04/ubuntu-studio-22-04-lts-released/ >>>>

Upgrading

Since it’s just out, you may experience some issues, so you might want to wait a bit before upgrading.

Due to the change in the desktop environment that started after the release of 20.04 LTS, direct upgrades from 20.04 LTS are not supported and may only be attempted at-your-own-risk. As with any system-critical operation, back-up your data before attempting any upgrade. The safest upgrade path is a backup of your /home directory and a clean install.

We have had anecdotal reports of successful upgrades from 20.04 LTS (Xfce desktop) to later releases (Plasma desktop), but this will remain at your own risk, and it is highly recommended to wait until 22.04.1 is released in August before attempting such an upgrade.

Instructions for upgrading are included in the release notes.

========

Personally, I did a clean install of Ubuntu Studio 22.04 in VMware Workstation Pro 15 – and would recommend it because this allows you to clean up and start fresh with Ubuntu Studio 22.04 LTS with a new set of applications and a new desktop environment.

LSE