Skip to content

Instantly share code, notes, and snippets.

@shakhmehedi
Created September 23, 2016 18:34
Show Gist options
  • Save shakhmehedi/912034f1e6b73d4aa2c1bae57a7bef08 to your computer and use it in GitHub Desktop.
Save shakhmehedi/912034f1e6b73d4aa2c1bae57a7bef08 to your computer and use it in GitHub Desktop.
Ubuntu 16.04: Add environment variable globally permanantly

For this example I have used magento2 cli. Asuming magento2 cli is located in /var/www/magento2/bin.

#create the script file
echo "export PATH=$PATH:/var/www/magento2/bin" > /etc/profile.d/magento2_bin.sh

#run the file to load 
source /etc/profile.d/magento2_bin.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment