command line - Environment variables not working in Ubuntu 14.04 - Ask Ubuntu
i new linux. it's first time working command line , i'm trying make web sever learning purposes, not going lamp stack. instead installing programs apache, php, , mysql manually.
i got apache working , php working problem i'm facing can't run commands php -i
. instead have run path/to/php/bin-directory/php -i
.
in windows can achieve adding environment variables looked around, , seeme can same thing in ubuntu. modified /etc/environment
file , added path php, , tried adding path via command:
export path=$path:/path/to/php/bin-directory/
both these methods worked , added path environment variable. confirmed via printenv
, still unable call php command directly php -i
.
i not sure if that's how it's supposed work, suggestions appreciated.
thanks
edit:
output of few commands:
every time execute command:
export path=$path:/path/to/php/bin-directory/
you modify environment in current shell, i.e. program executed in terminal window. change not happen other terminal windows (or other tabs on current terminal program). change not survive logoff/logon and/or restart.
to make change persistent see question how add directory path?
Comments
Post a Comment