Results 1 to 4 of 4

Thread: Setting system variable

  1. #1
    Join Date
    Feb 2005
    Location
    Indonesia
    Beans
    321
    Distro
    Ubuntu Breezy 5.10

    Setting system variable

    How do I set up new system variable in Ubuntu?

    I already wrote it in /etc/profile and /home/*/.bash_profile but the variable didn't came out when I echoed it from the console. I even reboot my computer since changing session didn't even worked when I echoed it.

    I wrote this variable:
    JAVA_HOME="/usr/local/jdk1.5.0_01"
    PATH="$PATH:$JAVA_HOME/bin"

    It worked on other distro but it didn't work on my Hoary?

    Anybody could help me on this?

    Thnx in advance.

  2. #2
    Join Date
    Apr 2005
    Location
    Finland
    Beans
    Hidden!
    Distro
    Hardy Heron (Ubuntu Development)

    Re: Setting system variable

    Try putting export in front of those lines. It's actually more shell feature than distribution specific.

  3. #3
    Join Date
    Oct 2004
    Location
    /home
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Setting system variable

    yes, you need export in front of those lines. I'm not sure I've used a distribution that worked differently.

  4. #4
    Join Date
    Feb 2005
    Location
    Indonesia
    Beans
    321
    Distro
    Ubuntu Breezy 5.10

    Re: Setting system variable

    I've got it now guys.

    Actually in Ubuntu it is writeen in /etc/bash.bash_profile

    Hopefully this is useful for those facing the same problem with me

Bookmarks

Posting Permissions

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