Link to home
Start Free TrialLog in
Avatar of MrTV
MrTVFlag for Thailand

asked on

linux not remember varia ble

#longpath="/var/www/vhosts/huatanon.com/httpdocs/joomecos/components/com_virtuemart/shop_image/product/"
# cd /home
# ls
# cd $longpath

it seam to not remember  $longpath  when I sig out from ssh and reconnect again
It not rememebr
#longpath="/var/www/vhosts/huatanon.com/httpdocs/joomecos/components/com_virtuemart/shop_image/product/"
How can i make it remember every time when i login
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
also you need to export it for it to become an environment variable like you are trying to achieve, however Tintin's solution with the alias in the recommended files is a much cleaner suggestion.
Avatar of Tintin
Tintin

A variable only needs to be exported if it is going to be referenced in child processes.