how to set global environment variables linuxmint?











up vote
0
down vote

favorite












I have installed JAVA using this guide https://community.linuxmint.com/tutorial/view/1372 It works, but I don't know how to set JAVA_HOME variable for all my users.



How to set global environment varialbes in Linux Mint ?



I'm using LinuxMint 18 Sara xfce










share|improve this question






















  • also asked in linuxmint forums, wating for help: forums.linuxmint.com/… At the moment I solved for some users defining JAVA_HOME in .bash_aliases but i desire a global solution. Thanks in advance
    – MadMad666
    Jan 26 '17 at 15:51















up vote
0
down vote

favorite












I have installed JAVA using this guide https://community.linuxmint.com/tutorial/view/1372 It works, but I don't know how to set JAVA_HOME variable for all my users.



How to set global environment varialbes in Linux Mint ?



I'm using LinuxMint 18 Sara xfce










share|improve this question






















  • also asked in linuxmint forums, wating for help: forums.linuxmint.com/… At the moment I solved for some users defining JAVA_HOME in .bash_aliases but i desire a global solution. Thanks in advance
    – MadMad666
    Jan 26 '17 at 15:51













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have installed JAVA using this guide https://community.linuxmint.com/tutorial/view/1372 It works, but I don't know how to set JAVA_HOME variable for all my users.



How to set global environment varialbes in Linux Mint ?



I'm using LinuxMint 18 Sara xfce










share|improve this question













I have installed JAVA using this guide https://community.linuxmint.com/tutorial/view/1372 It works, but I don't know how to set JAVA_HOME variable for all my users.



How to set global environment varialbes in Linux Mint ?



I'm using LinuxMint 18 Sara xfce







linux-mint xfce






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 26 '17 at 15:22









MadMad666

196138




196138












  • also asked in linuxmint forums, wating for help: forums.linuxmint.com/… At the moment I solved for some users defining JAVA_HOME in .bash_aliases but i desire a global solution. Thanks in advance
    – MadMad666
    Jan 26 '17 at 15:51


















  • also asked in linuxmint forums, wating for help: forums.linuxmint.com/… At the moment I solved for some users defining JAVA_HOME in .bash_aliases but i desire a global solution. Thanks in advance
    – MadMad666
    Jan 26 '17 at 15:51
















also asked in linuxmint forums, wating for help: forums.linuxmint.com/… At the moment I solved for some users defining JAVA_HOME in .bash_aliases but i desire a global solution. Thanks in advance
– MadMad666
Jan 26 '17 at 15:51




also asked in linuxmint forums, wating for help: forums.linuxmint.com/… At the moment I solved for some users defining JAVA_HOME in .bash_aliases but i desire a global solution. Thanks in advance
– MadMad666
Jan 26 '17 at 15:51










1 Answer
1






active

oldest

votes

















up vote
0
down vote













How do I set global environment variables in Linux Mint?



Set them in /etc/profile.




When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists.



After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.




Source 6.2 Bash Startup Files






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1171837%2fhow-to-set-global-environment-variables-linuxmint%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    How do I set global environment variables in Linux Mint?



    Set them in /etc/profile.




    When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists.



    After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.




    Source 6.2 Bash Startup Files






    share|improve this answer

























      up vote
      0
      down vote













      How do I set global environment variables in Linux Mint?



      Set them in /etc/profile.




      When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists.



      After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.




      Source 6.2 Bash Startup Files






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        How do I set global environment variables in Linux Mint?



        Set them in /etc/profile.




        When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists.



        After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.




        Source 6.2 Bash Startup Files






        share|improve this answer












        How do I set global environment variables in Linux Mint?



        Set them in /etc/profile.




        When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists.



        After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior.




        Source 6.2 Bash Startup Files







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 26 '17 at 16:52









        DavidPostill

        102k25217253




        102k25217253






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1171837%2fhow-to-set-global-environment-variables-linuxmint%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

            Alcedinidae

            RAC Tourist Trophy