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

Mattiman's avatar

bash homestead command not found

Following the Homestead setup on a new mac, I'm stuck at the following step:

$ homestead up
-bash: homestead: command not found

I have set up everything in the steps before that successfully I think. I have a .homestead folder inside my use root folder. Inside that there is the Homestead.yaml file which I configured like the docs told me to.

I also have a ~/code/Homestead folder

I also created a .bash_profile file with: PATH=~/.composer/vendor/bin:PATH

So how and where do I start up homestead? I guess there's something not right with a path somewhere. But I have no clue.

0 likes
12 replies
usman's avatar

@Mattiman hmm I think you are missing a '$' in your exported path:

export PATH=~/.composer/vendor/bin:$PATH

Usman.

2 likes
Mattiman's avatar

Sorry that was a typo in my forum post here. In the .bash_profile itself it is exactly like you have written.

Should I do something else with that .bash_profile file? Run it?

usman's avatar

No, you don't need to run it Mac's Terminal automatically runs it for new terminal window.

Mattiman's avatar

@usman that is:

/Users/mattiman/.composer/vendor/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Mattiman's avatar

@usman I'm running Terminal on OS X.

On my other mac I use that as well. On my new Mac (running Yosemite) it doesn't work.

One difference I see is that on the mac where it works I have identical Homestead.yaml files both in:

.homestead/Homestead.yaml
/code/Homestead/Homestead.yaml

While on the new mac where it doesn't work I have only one:

.homestead/Homestead.yaml

Would that make a difference?

Thanks for the help by the way!

usman's avatar

Are you able to run the homestead using the full path i.e. ~/.composer/vendor/bin/homestead ?

Mattiman's avatar

There is no vendor/bin/homestead folder and file. So running this gives an error:

$ ~/.composer/vendor/bin/homestead up
-bash: /Users/mattiman/.composer/vendor/bin/homestead: No such file or directory
usman's avatar
usman
Best Answer
Level 27

You need to install it first, use this command:

composer global require "laravel/homestead=~2.0"

I hope after this you will be able to access the homestead command because your path is correct.

2 likes
Mattiman's avatar

Aha now it's doing something! After running your command it installed something in .composer/ and after that I could run homestead up!

I was confused because in the docs there are 2 options: Option 1 - Manually Via Git (No Local PHP) [...] Option 2 - With Composer + PHP Tool [...]

I did the first one. But that is not complete so it seems.

1 like
freedomfflow's avatar

I have this in my .zshrc file

export PATH=/usr/local/php5/bin:$PATH:~/.composer/vendor/bin:~/.composer/vendor/symfony

The 'composer' entries are the ones you need in your path I believe

ahmednawazkhan's avatar

can someone explain what this is export PATH=~/.composer/vendor/bin:$PATH

Please or to participate in this conversation.