Thread: Set permanent environment variable for a user
hi,
trying set environment variable user not sure how to.
read here
does mean have add following line either of files?environment variable settings should affect particular user (rather system whole) should set into:
~/.pam_environment - file meant setting user's environment. not script file, rather consists of assignment expressions, 1 per line.
note: using .pam_environment requires re-login in order initialize variables. restarting terminal not sufficient able use variables.
if using kde, see kde user-base page on topic.
not recommended:
~/.profile - best file placing environment variable assignments, since gets executed automatically displaymanager during start-up process desktop session login shell when 1 logs-in textual console.
~/.bash_profile or ~./bash_login - if 1 of these file exist, bash executes rather "~/.profile" when started login shell. (bash prefer "~/.bash_profile" "~/.bash_login"). however, these files won't influence graphical session default.
~/.bashrc - because of way ubuntu sets various script files default, may easiest place set variables in. default configuration guarantees file executed in each , every invocation of bash while logging in graphical environment. however, performance-wise may not best thing since cause values unnecessarily set many times.
code:export abc=/home/user/abc
what variable wanting set?
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support New to Ubuntu [ubuntu] Set permanent environment variable for a user
Ubuntu
Comments
Post a Comment