Quote:
Originally Posted by
System Admin 77
Is it recommended to edit the file "/etc/environment" directly using vi ?
(like by adding some export something= value staements)
or
do we need to edit /etc/profile file
It is
highly recommended to use
vi for editing both of these files.
Still, putting "export"-statements into
/etc/environment will not work at all and just lead to ignored lines causing error messages. In
/etc/environment there are only three types of lines allowed:
1. comments
2. empty lines (white space is ok)
3. lines of the type "identifier=value", where <identifier> is any legal name for a shell variable and <value> is any legal content of same.
It is quite common to attempt the misuse of /etc/environment by adding all sorts of profile statements (export, if....then..., etc.), but all these will not work at all.
I hope this helps.
bakunin