MrTV
asked on
linux not remember varia ble
#longpath="/var/www/vhosts /huatanon. com/httpdo cs/joomeco s/componen ts/com_vir tuemart/sh op_image/p roduct/"
# 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/httpdo cs/joomeco s/componen ts/com_vir tuemart/sh op_image/p roduct/"
How can i make it remember every time when i login
# 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
How can i make it remember every time when i login
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
A variable only needs to be exported if it is going to be referenced in child processes.