I've installed composer
and the laravel
installer which is now located unter ~/.config/composer/vendor/bin
. I want to use laravel
directly as a command from anywhere, so I tried to add the directory to the $PATH
variable. I probably could create a symlink for the installer to /usr/local/bin
but I still don't know why I can't set it permanently. I tried multiple ways
export PATH=$PATH:~/.config/composer/vendor/bin
- Adding it to
~/.profile
like above and without theexport
statement and the value in quotes - Adding it to
~/.bashrc
like above and without theexport
statement and the value in quotes - Adding it to
/etc/environment
likePATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:~/.config/composer/vendor/bin"
After doing all of that (for 2 & 3 I even did source
) it worked for the current session, but as soon as I closed the Terminal
and reopened it the output would always be:
tzfrs@ubuntu:~$ laravel
laravel: command not found
I don't have any bash_login
or bash_profile
file in my home directory.
/home/username/.config/composer/vendor/bin
~/.profile
and/etc/environment
but no luck/etc/environment
I believe you need to reboot for the global changes to take effect.