I’m fairly new to terminal and very new to Drush – I’ve installed Drush on my VPS using Composer and when I ssh as root all works fine. However I realise I shouldn’t be using root so am trying to set up using another user but keep getting:
env: drush: No such file or directory
I realise this is something to do with the path to drush but cannot work out what I’ve got wrong. Here are my .bashrc and .bashprofile contents:
ROOT .bashrc:
# .bashrc # To fix 'stdin is not a tty' error with Drush alias connections export PATH=$PATH:~/.composer/vendor/drush/drush [ -z "$PS1" ] && return # User specific aliases and functions # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi
ROOT .bash_profile:
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin PATH="$HOME/.composer/vendor/bin:$PATH" export PATH
USER .bashrc:
# .bashrc # To fix 'stdin is not a tty' error with Drush alias connections export PATH=$PATH:~/.composer/vendor/drush/drush [ -z "$PS1" ] && return # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions alias drush='~/.composer/vendor/drush/drush'
USER .bash_profile
# .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin PATH="$HOME/.composer/vendor/bin:$PATH" export PATH
I’ve googled lots of solutions and tried various things so may by now have a bit of a mash up of things in these files!