===================================================================
Open your terminal using Ctrl+Alt+T
and type the following commands
composer global require "laravel/installer"
export PATH="~/.config/composer/vendor/bin:$PATH"
laravel new blog
cd blog
composer install
php artisan serve
Open a web browser and visit localhost:8000
to see the laravel welcome page
Terminate php server in terminal by pressing Ctrl+C
Thus you have successfully installed laravel globally.
After step 2 the command Laravel work, but if I close the terminal, open a new terminal and type the command
laravel
not work more(bash: laravel:comando not found),then I resolve this in my ubuntu 20.04 follow this steps:
https://stackoverflow.com/questions/61395786/i-get-laravel-command-not-found-on-ubuntu-20-04