Shell environment variable [duplicate]

Multi tool use
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.
environment-variables
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.
add a comment |
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.
environment-variables
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
add a comment |
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.
environment-variables
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
environment-variables
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.
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
add a comment |
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
add a comment |
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
vmrgSBAyhacrratFL,J6gqUPTy2ZnG,XD4K9B7WdRwI 4r,HIuw1E3Ffac
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