Laravel command not found in Linux system

Are you getting errors in the laravel command not found after installing the Laravel installer using Composer on the Linux system?

The Laravel installation was successful and no errors were encountered, but maybe you faced an issue when attempting to create a new project using the command “laravel new {project-name}”.

It did not work properly. I searched for a solution on Google and found one that may be helpful. You can try it out.

Step 1:

Open terminal/cmd from the start panel.

Step 2:

Locate the home/{name_of_user_directory} folder in the terminal using the cd command.

Step 3:

Run the “sudo nano .bashrc” command to edit the file.

Step 4:

Add below the line at the end of the file.

Step 5:

Press CLT + X to exit and save the file.
Press Y for the “Save modified buffer?”
Hit Enter without changing the name.
Close the terminal open a new one and type laravel -v

If it still doesn’t work, please reach out to us. We are happy to help you.

Article written by

The WebCoder

We are skilled in all aspects of web design, from planning and development to design and testing. I also have experience in web development technologies.