Find the answer to your Linux question:
Results 1 to 5 of 5
I am getting mad. I have several enviroment variables need to be defined like other global variables such as PATH, SHELL, HOME,etc. I have tried to add the definition in ...
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    26

    NEED HELP, define global enviroment variables in SUSE

    I am getting mad. I have several enviroment variables need to be defined like other global variables such as PATH, SHELL, HOME,etc. I have tried to add the definition in many files, such as /etc/profile, /etc/csh.login..., but none of them works. What I want is, each time I login as a root, and those variables should be available like PATH,SHELL,HOME. So could you please help me ? Thank you very much

    I am using SUSE 10.1

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    define those variables in root's .bashrc file.
    Code:
    vi /root/.bashrc




    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Oct 2006
    Posts
    26
    I have set my default shell as tcsh. Even though I do not, .bashrc also does not work. I have tried many times.

  4. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    how did you define variables? you have to log out and login back after defining variables.




    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  5. #5
    Just Joined!
    Join Date
    Oct 2006
    Posts
    26
    i use export to define variables. After I define them, I closed the terminal and then open another one, but the newly defined variables are not there. Do I have to reboot the machine?

    By the way, I have solved the problem by putting a sh file in /etc/profile.d/. After rebooting the machine, the variables are there. However, when I logon from another machine by ssh, I cannot get the variables on that machine unless I re-define them. Could you tell me the reason or how I can get those variables automatically like PATH SHELL HOME by ssh logging on? Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...