Where are the environment variables under Ubuntu?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • momotaro
    Contributor
    • Sep 2006
    • 357

    Where are the environment variables under Ubuntu?

    Hi,
    I'm trying to permanently modify some environment variables, but it seems that I can't find the file that contains them. Can You please in light me.


    Best regards
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    Which ones are you trying to modify?

    Comment

    • momotaro
      Contributor
      • Sep 2006
      • 357

      #3
      Is there any file that hold all of them ?

      Comment

      • sicarie
        Recognized Expert Specialist
        • Nov 2006
        • 4677

        #4
        No, it really depends on what you're attempting to do.

        Are you attempting to interact with a program? Or just the shell? Change logon behavior? What do you want to do?

        Comment

        • momotaro
          Contributor
          • Sep 2006
          • 357

          #5
          I need (for an exercice) to change at least 20 envirenoment variables so I have no idea about those tat we can't change permanently and those that we can't...

          Comment

          • numberwhun
            Recognized Expert Moderator Specialist
            • May 2007
            • 3467

            #6
            On the command line, simply type the following and hit enter:

            Code:
            env
            That will print out a list of the environment variables. Mind you I am using bash, but each shell should have this command or something similar. You can also redirect it to a file if you need to.

            Regards,

            Jeff

            Comment

            • momotaro
              Contributor
              • Sep 2006
              • 357

              #7
              I know that thx for your help but am looking for a file that contains them that I could change so I alter them permanetly
              best regards

              Comment

              • Mariostg
                Contributor
                • Sep 2010
                • 332

                #8
                You can alter permanently on a user basis by modifying the .bashrc file.

                Comment

                • numberwhun
                  Recognized Expert Moderator Specialist
                  • May 2007
                  • 3467

                  #9
                  @Mariostg is correct. If you want different values for the environment variables, you should set them in your .bashrc file. The environment variables are set dynamically when you log in. I don't know of any file where they are set. You change their values as needed with your rc file.

                  Comment

                  • momotaro
                    Contributor
                    • Sep 2006
                    • 357

                    #10
                    Let's say that I want to check the system language!
                    if the language is English change it to French...
                    So I'll be needing the list of possible values and where to find this list and how to apply the changes

                    Comment

                    • numberwhun
                      Recognized Expert Moderator Specialist
                      • May 2007
                      • 3467

                      #11
                      If there are things that you want to change in Ubuntu and you don't know how, us google. For instance, I searched for "change system language ubuntu" and one of the first results was this. That should help you with that issue.

                      Comment

                      Working...