Timeline for How do I set a user environment variable? (permanently, not session)
Current License: CC BY-SA 3.0
20 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 19, 2019 at 5:33 | comment | added | Nathan Basanese | // , Any way to do this without putting the values in a disk file? | |
| Jul 22, 2017 at 8:27 | answer | added | Ayushi Agarwal | timeline score: 1 | |
| May 21, 2015 at 23:07 | history | edited | Gilles 'SO- stop being evil' |
edited tags
|
|
| Nov 6, 2014 at 14:50 | comment | added | user3730 |
This is not a full answer, but if it's shell-specific, I recommend putting it in .bashrc; if it's not, put it in .profile. I source .profile and .bashrc (in that order) from .bash_profile, and make sure to put [[ $- != *i* ]] && return on the top of .bashrc.
|
|
| Aug 31, 2013 at 14:52 | answer | added | Иван Бишевац | timeline score: 2 | |
| Mar 13, 2013 at 4:33 | answer | added | Hokam | timeline score: 62 | |
| Sep 28, 2011 at 12:47 | comment | added | user4069 | @rozcietrzewiacz: thanks. Somehow i notice that line adds in bashrc UNLESS i stick a new line (making it 2lines with the second one empty). I'm clueless but it works with one line so i am happy | |
| Sep 28, 2011 at 12:40 | comment | added | user4069 |
what the heck!? i tried ssh-ing in and the variables i set in .bashrc show but not the ones in .bash_profile! ok, easy fix but... i dont understand why this is happening.
|
|
| Sep 28, 2011 at 12:38 | comment | added | rozcietrzewiacz |
Check that .bash_profile contains something like [[ -f ~/.bashrc ]] && . ~/.bashrc.
|
|
| Sep 28, 2011 at 12:31 | comment | added | user4069 | @rozcietrzewiacz: ok but... even after having the solution i tried setting ABC1 and ABC2 at the start and end of that file and it isnt set in my environment. | |
| Sep 28, 2011 at 11:58 | comment | added | rozcietrzewiacz |
.bashrc is the main place for that.
|
|
| Sep 28, 2011 at 11:51 | vote | accept | CommunityBot | ||
| Sep 28, 2011 at 11:50 | answer | added | l0b0 | timeline score: 9 | |
| Sep 28, 2011 at 11:39 | history | edited | Stéphane Gimenez | CC BY-SA 3.0 |
added 1 characters in body; edited title
|
| Sep 28, 2011 at 11:33 | comment | added | user4069 | editing .bashrc, .bash_profile, .profile and .ssh/eviroment. Although i dont know if i wrote it in the right location or had the right syntax each time | |
| Sep 28, 2011 at 11:25 | comment | added | l0b0 | What did you try already? | |
| Sep 28, 2011 at 11:15 | answer | added | Matteo | timeline score: 143 | |
| Sep 28, 2011 at 11:11 | history | edited | user4069 | CC BY-SA 3.0 |
edited title
|
| Sep 28, 2011 at 11:04 | answer | added | whoami | timeline score: 8 | |
| Sep 28, 2011 at 11:00 | history | asked | user4069 | CC BY-SA 3.0 |