Find the answer to your Linux question:
Results 1 to 4 of 4
Hi everyone, I'm pretty new to linux. I'm running a script which adds some environment variables such as JAVA_HOME to .profile file. As of now i'm restarting my system whenever ...
  1. #1
    Just Joined!
    Join Date
    Nov 2010
    Posts
    2

    [SOLVED] Changes in .profile

    Hi everyone,

    I'm pretty new to linux. I'm running a script which adds some environment variables such as JAVA_HOME to .profile file. As of now i'm restarting my system whenever i make changes in .profile to reflect the changes.

    Is there any way to reflect the changes made in .profile file without either restarting or rebooting the system..?

    It will be very helpful if there are some commands which i can include in my script so that my system need not be restarted.

    Any help would be appreciated.


    Regards

    Anandh

  2. #2
    Just Joined! barriehie's Avatar
    Join Date
    Apr 2008
    Posts
    81
    Try:
    Code:
    $ > source ./.profile
    this is assuming your in $HOME directory.

  3. #3
    Just Joined!
    Join Date
    Nov 2010
    Posts
    2
    Thanks barriehie. It worked like a gem.

  4. #4
    Just Joined! barriehie's Avatar
    Join Date
    Apr 2008
    Posts
    81
    Your Welcome!

Posting Permissions

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