Shell environment variable [duplicate]












0
















This question already has an answer here:




  • How do I set environment variables?

    6 answers



  • Where to declare environment variables?

    4 answers




Whenever i try to save a variable in .bashrc file of my home directory, it's not giving me the desired result.
I'm trying to save



D=/home/winie/Desktop ; export D


But when i do echo $D in shell, it doesn’t give any result.










share|improve this question









New contributor




Vinit Bhardwaj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











marked as duplicate by wjandrea, karel, Kulfy, Eric Carvalho, Charles Green 2 days ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.











  • 1





    Saving the export to your .bashrc won't affect the current shell - are you re-sourcing .bashrc (. ~/.bashrc) or starting a new shell?

    – steeldriver
    Jan 10 at 17:30











  • Voila. You’re right. Its in effect after restarting the shell or opening a new shell tab..

    – Vinit Bhardwaj
    Jan 10 at 17:34
















0
















This question already has an answer here:




  • How do I set environment variables?

    6 answers



  • Where to declare environment variables?

    4 answers




Whenever i try to save a variable in .bashrc file of my home directory, it's not giving me the desired result.
I'm trying to save



D=/home/winie/Desktop ; export D


But when i do echo $D in shell, it doesn’t give any result.










share|improve this question









New contributor




Vinit Bhardwaj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











marked as duplicate by wjandrea, karel, Kulfy, Eric Carvalho, Charles Green 2 days ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.











  • 1





    Saving the export to your .bashrc won't affect the current shell - are you re-sourcing .bashrc (. ~/.bashrc) or starting a new shell?

    – steeldriver
    Jan 10 at 17:30











  • Voila. You’re right. Its in effect after restarting the shell or opening a new shell tab..

    – Vinit Bhardwaj
    Jan 10 at 17:34














0












0








0









This question already has an answer here:




  • How do I set environment variables?

    6 answers



  • Where to declare environment variables?

    4 answers




Whenever i try to save a variable in .bashrc file of my home directory, it's not giving me the desired result.
I'm trying to save



D=/home/winie/Desktop ; export D


But when i do echo $D in shell, it doesn’t give any result.










share|improve this question









New contributor




Vinit Bhardwaj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













This question already has an answer here:




  • How do I set environment variables?

    6 answers



  • Where to declare environment variables?

    4 answers




Whenever i try to save a variable in .bashrc file of my home directory, it's not giving me the desired result.
I'm trying to save



D=/home/winie/Desktop ; export D


But when i do echo $D in shell, it doesn’t give any result.





This question already has an answer here:




  • How do I set environment variables?

    6 answers



  • Where to declare environment variables?

    4 answers








environment-variables






share|improve this question









New contributor




Vinit Bhardwaj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Vinit Bhardwaj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Jan 10 at 18:28









wjandrea

8,49742259




8,49742259






New contributor




Vinit Bhardwaj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Jan 10 at 17:28









Vinit BhardwajVinit Bhardwaj

84




84




New contributor




Vinit Bhardwaj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Vinit Bhardwaj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Vinit Bhardwaj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




marked as duplicate by wjandrea, karel, Kulfy, Eric Carvalho, Charles Green 2 days ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by wjandrea, karel, Kulfy, Eric Carvalho, Charles Green 2 days ago


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 1





    Saving the export to your .bashrc won't affect the current shell - are you re-sourcing .bashrc (. ~/.bashrc) or starting a new shell?

    – steeldriver
    Jan 10 at 17:30











  • Voila. You’re right. Its in effect after restarting the shell or opening a new shell tab..

    – Vinit Bhardwaj
    Jan 10 at 17:34














  • 1





    Saving the export to your .bashrc won't affect the current shell - are you re-sourcing .bashrc (. ~/.bashrc) or starting a new shell?

    – steeldriver
    Jan 10 at 17:30











  • Voila. You’re right. Its in effect after restarting the shell or opening a new shell tab..

    – Vinit Bhardwaj
    Jan 10 at 17:34








1




1





Saving the export to your .bashrc won't affect the current shell - are you re-sourcing .bashrc (. ~/.bashrc) or starting a new shell?

– steeldriver
Jan 10 at 17:30





Saving the export to your .bashrc won't affect the current shell - are you re-sourcing .bashrc (. ~/.bashrc) or starting a new shell?

– steeldriver
Jan 10 at 17:30













Voila. You’re right. Its in effect after restarting the shell or opening a new shell tab..

– Vinit Bhardwaj
Jan 10 at 17:34





Voila. You’re right. Its in effect after restarting the shell or opening a new shell tab..

– Vinit Bhardwaj
Jan 10 at 17:34










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

How did Captain America manage to do this?

迪纳利

南乌拉尔铁路局