Laravel command not found in Linux system

Are you getting an error when creating a new project of Laravel, Laravel command not found, using laravel new after successful composer installation 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 the terminal/cmd from the start panel.

Terminal

Step 2:

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

Locate Direcory

Step 3:

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

Step 4:

Add below the line at the end of the file.

Update source 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

Save file

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.

Let's Connect