Search code examples
phplaravelcomposer-phphomestead

How to run Composer on Homestead?


Where is Composer installed within Laravel Homestead virtual machine – the main question is that why it isn't aliased as 'composer'?

When Homestead is provisioning I can see it running composer self-update so it is there...

Update: Found this in homestead.rb

# Update Composer On Every Provision
config.vm.provision "shell" do |s|
    s.inline = "/usr/local/bin/composer self-update"
end

In ~/.homestead/aliases was this (I don't recall for sure if it was added by me):

alias composer='composer.phar'

If that alias was there as default, it doesn't point to global composer installation. So anyway, there is no global alias defined for composer even it is installed globally in Homestead?


Solution

  • Composer has been installed in Homestead machine at path /usr/local/bin/composer.

    However, there has been no aliases created, possibly because different people are used to different shorthands.