Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hasen39's avatar

laravel command not found

i want to install laravel in my linux min 18.3 i install composer after i install composer i run this command

composer global require laravel/installer

and i run this command

laravel new project1

laravel command not found error displayed

any one who help me

0 likes
4 replies
Sergiu17's avatar

Make sure to place composer's system-wide vendor bin directory in your $PATH so the laravel executable can be located by your system. This directory exists in different locations based on your operating system; however, some common locations include:

$HOME/.config/composer/vendor/bin

https://stackoverflow.com/questions/25373188/laravel-installation-how-to-place-the-composer-vendor-bin-directory-in-your - example.

And after installation, restart your terminal.

1 like
dublue's avatar

after running composer global require laravel/installer script, it downloads laravel/installer into ~/.config/composer/vendor. Thus to run next command, you need to add larael executable to the PATH, which is atm $HOME/.config/composer/vendor/laravel/installer/bin

AHMED1's avatar

it's work

export PATH="$PATH:$HOME/.config/composer/vendor/bin"
5 likes

Please or to participate in this conversation.