Where's .bashrc for root?











up vote
27
down vote

favorite
7












I know it's not best practice, but on my dev system I login as root. What's the equivalent of the .bashrc file so I can alias some functions?



I've found the /etc/bash.bashrc & /etc/bash.bashrc.local but I'm not sure where to plop my commands.



Running x86_64 SUSE.



thanks, mjb.










share|improve this question




























    up vote
    27
    down vote

    favorite
    7












    I know it's not best practice, but on my dev system I login as root. What's the equivalent of the .bashrc file so I can alias some functions?



    I've found the /etc/bash.bashrc & /etc/bash.bashrc.local but I'm not sure where to plop my commands.



    Running x86_64 SUSE.



    thanks, mjb.










    share|improve this question


























      up vote
      27
      down vote

      favorite
      7









      up vote
      27
      down vote

      favorite
      7






      7





      I know it's not best practice, but on my dev system I login as root. What's the equivalent of the .bashrc file so I can alias some functions?



      I've found the /etc/bash.bashrc & /etc/bash.bashrc.local but I'm not sure where to plop my commands.



      Running x86_64 SUSE.



      thanks, mjb.










      share|improve this question















      I know it's not best practice, but on my dev system I login as root. What's the equivalent of the .bashrc file so I can alias some functions?



      I've found the /etc/bash.bashrc & /etc/bash.bashrc.local but I'm not sure where to plop my commands.



      Running x86_64 SUSE.



      thanks, mjb.







      linux root bashrc






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 27 '14 at 10:41









      Nikos Alexandris

      153113




      153113










      asked Apr 8 '11 at 19:22









      mbb

      1,60152036




      1,60152036






















          6 Answers
          6






          active

          oldest

          votes

















          up vote
          18
          down vote



          accepted










          Probably best to put them in ~/.bashrc . It seems root doesn't get the normal ones by default in some distros, but you just cp /etc/skel/.bash* ~ to fix that.






          share|improve this answer





















          • There we go --- I didn't know about the skel directory. Do you happen to know if that's the default? If I edit it, will it work universally if the user doesn't have a ~/.bashrc ?
            – mbb
            Apr 10 '11 at 19:30






          • 1




            @mjb That's where new accounts get their default home directory. The useradd tool copies files from there. It is otherwise not used. You can add and alter stuff in there if you want every newly created user to have a different set of files. Think of it as the new user home dir template.
            – Keith
            Apr 11 '11 at 3:57


















          up vote
          12
          down vote













          How about the home dir of root that is /root/?



          From some aspects, root is just another user (just better, and allowed more).
          root has a home dir, but it is not like the other users in /home/,
          but simply /root/ so root:s .bashrc is therefore /root/.bashrc



          The ones in /etc is system specific settings for all users, including root.





          Thanks to grawity to point out that you can use ~root points to the root home dir,
          regardless of where it is.



          You can test that with



          $> echo  ~root
          /root


          So even thou /root will work on 99% on the systems out there ~root is probably more portable and will probably work on 100%.



          ~root/.bashrc





          share|improve this answer



















          • 1




            Sometimes it is in /home. It's best to use ~root/.bashrc to refer to the file in root's homedir.
            – grawity
            Apr 8 '11 at 19:39






          • 5




            The root home directory isn't in /home because in some *nix systems, /home is on a separate partition from the system drive and is not necessarily mounted.
            – CarlF
            Apr 8 '11 at 19:40










          • You highlight why I was so confused --- there is no /root/.bashrc on this build.
            – mbb
            Apr 10 '11 at 19:29










          • probably work on 100%, i almots completely understand
            – Mateus Viccari
            May 24 '17 at 22:34


















          up vote
          1
          down vote













          Instead of using /root/.bashrc try using /root/.profile — it's the same thing, just a different name.



          Also, if you are using su to get into root it may not be reading the .bashrc or .profile
          – just issuing su will not run the login scripts. try doing



          su -





          share|improve this answer



















          • 6




            I beg to differ that a profile and bashrc are "the same thing".
            – slhck
            Jun 27 '12 at 7:39










          • Works for ttylinux ver 14.1 [boomslang] , Linux kernel: 2.6.38.1
            – GeoMint
            Apr 3 at 12:51










          • @Slhck if they aren't the same thing, can you explain the differences? I'm a noob
            – Gabriel Fair
            Apr 20 at 17:35










          • @Gabriel superuser.com/questions/183870/…
            – slhck
            Apr 21 at 15:21


















          up vote
          0
          down vote













          Normally the .bashrc file for the root user should be there: /root/.bashrc

          If it is not the case, you can copy the 2 following files into /root, then you can edit the .bashrc file as you want.



          cp /etc/skel/.bash_profile /root
          cp /etc/skel/.bashrc /root





          share|improve this answer




























            up vote
            0
            down vote













            The similar topic: Why suse doesn't have .bash_profile or .bashrc for root user



            SuSe use /etc/bash.bashrc file to manage the environment. It's not indicated to add configs on this file, becouse when the server get updated, you'll lost your personal configuration.



            You can create an archieve named bash.bashrc.local on /etc. The system will load any instruction found on this file, and then search for the default conf and execute both.



            # vi /etc/bash.bashrc.local


            Have fun!






            share|improve this answer























            • /etc/bash.bashrc for SuSE Linux PLEASE DO NOT CHANGE /etc/bash.bashrc There are chances that your changes will be lost during system upgrades. Instead use /etc/bash.bashrc.local for bash or /etc/ksh.kshrc.local for ksh or /etc/zsh.zshrc.local for the zsh or /etc/ash.ashrc.local for the plain ash bourne shell for your local settings, favourite global aliases, VISUAL and EDITOR variables, etc ...
              – Leonardo Benevides
              Nov 19 '15 at 13:35


















            up vote
            0
            down vote













            I looked here because on my (64-bit) Slackware 14.2, logging into root does most certainly NOT source /root/.bashrc. It DOES source /home/user/.bashrc on loggin to user account.
            There is no /etc/bash.bashrc, or any other bash files in /etc.
            Nor is there any such directory as /etc/skel apparently, in slack.






            share|improve this answer





















            • It's always nice to see some links to documentation.
              – davidbaumann
              Nov 19 at 15:04











            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%2f268460%2fwheres-bashrc-for-root%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            6 Answers
            6






            active

            oldest

            votes








            6 Answers
            6






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            18
            down vote



            accepted










            Probably best to put them in ~/.bashrc . It seems root doesn't get the normal ones by default in some distros, but you just cp /etc/skel/.bash* ~ to fix that.






            share|improve this answer





















            • There we go --- I didn't know about the skel directory. Do you happen to know if that's the default? If I edit it, will it work universally if the user doesn't have a ~/.bashrc ?
              – mbb
              Apr 10 '11 at 19:30






            • 1




              @mjb That's where new accounts get their default home directory. The useradd tool copies files from there. It is otherwise not used. You can add and alter stuff in there if you want every newly created user to have a different set of files. Think of it as the new user home dir template.
              – Keith
              Apr 11 '11 at 3:57















            up vote
            18
            down vote



            accepted










            Probably best to put them in ~/.bashrc . It seems root doesn't get the normal ones by default in some distros, but you just cp /etc/skel/.bash* ~ to fix that.






            share|improve this answer





















            • There we go --- I didn't know about the skel directory. Do you happen to know if that's the default? If I edit it, will it work universally if the user doesn't have a ~/.bashrc ?
              – mbb
              Apr 10 '11 at 19:30






            • 1




              @mjb That's where new accounts get their default home directory. The useradd tool copies files from there. It is otherwise not used. You can add and alter stuff in there if you want every newly created user to have a different set of files. Think of it as the new user home dir template.
              – Keith
              Apr 11 '11 at 3:57













            up vote
            18
            down vote



            accepted







            up vote
            18
            down vote



            accepted






            Probably best to put them in ~/.bashrc . It seems root doesn't get the normal ones by default in some distros, but you just cp /etc/skel/.bash* ~ to fix that.






            share|improve this answer












            Probably best to put them in ~/.bashrc . It seems root doesn't get the normal ones by default in some distros, but you just cp /etc/skel/.bash* ~ to fix that.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 9 '11 at 11:59









            Keith

            6,69812331




            6,69812331












            • There we go --- I didn't know about the skel directory. Do you happen to know if that's the default? If I edit it, will it work universally if the user doesn't have a ~/.bashrc ?
              – mbb
              Apr 10 '11 at 19:30






            • 1




              @mjb That's where new accounts get their default home directory. The useradd tool copies files from there. It is otherwise not used. You can add and alter stuff in there if you want every newly created user to have a different set of files. Think of it as the new user home dir template.
              – Keith
              Apr 11 '11 at 3:57


















            • There we go --- I didn't know about the skel directory. Do you happen to know if that's the default? If I edit it, will it work universally if the user doesn't have a ~/.bashrc ?
              – mbb
              Apr 10 '11 at 19:30






            • 1




              @mjb That's where new accounts get their default home directory. The useradd tool copies files from there. It is otherwise not used. You can add and alter stuff in there if you want every newly created user to have a different set of files. Think of it as the new user home dir template.
              – Keith
              Apr 11 '11 at 3:57
















            There we go --- I didn't know about the skel directory. Do you happen to know if that's the default? If I edit it, will it work universally if the user doesn't have a ~/.bashrc ?
            – mbb
            Apr 10 '11 at 19:30




            There we go --- I didn't know about the skel directory. Do you happen to know if that's the default? If I edit it, will it work universally if the user doesn't have a ~/.bashrc ?
            – mbb
            Apr 10 '11 at 19:30




            1




            1




            @mjb That's where new accounts get their default home directory. The useradd tool copies files from there. It is otherwise not used. You can add and alter stuff in there if you want every newly created user to have a different set of files. Think of it as the new user home dir template.
            – Keith
            Apr 11 '11 at 3:57




            @mjb That's where new accounts get their default home directory. The useradd tool copies files from there. It is otherwise not used. You can add and alter stuff in there if you want every newly created user to have a different set of files. Think of it as the new user home dir template.
            – Keith
            Apr 11 '11 at 3:57












            up vote
            12
            down vote













            How about the home dir of root that is /root/?



            From some aspects, root is just another user (just better, and allowed more).
            root has a home dir, but it is not like the other users in /home/,
            but simply /root/ so root:s .bashrc is therefore /root/.bashrc



            The ones in /etc is system specific settings for all users, including root.





            Thanks to grawity to point out that you can use ~root points to the root home dir,
            regardless of where it is.



            You can test that with



            $> echo  ~root
            /root


            So even thou /root will work on 99% on the systems out there ~root is probably more portable and will probably work on 100%.



            ~root/.bashrc





            share|improve this answer



















            • 1




              Sometimes it is in /home. It's best to use ~root/.bashrc to refer to the file in root's homedir.
              – grawity
              Apr 8 '11 at 19:39






            • 5




              The root home directory isn't in /home because in some *nix systems, /home is on a separate partition from the system drive and is not necessarily mounted.
              – CarlF
              Apr 8 '11 at 19:40










            • You highlight why I was so confused --- there is no /root/.bashrc on this build.
              – mbb
              Apr 10 '11 at 19:29










            • probably work on 100%, i almots completely understand
              – Mateus Viccari
              May 24 '17 at 22:34















            up vote
            12
            down vote













            How about the home dir of root that is /root/?



            From some aspects, root is just another user (just better, and allowed more).
            root has a home dir, but it is not like the other users in /home/,
            but simply /root/ so root:s .bashrc is therefore /root/.bashrc



            The ones in /etc is system specific settings for all users, including root.





            Thanks to grawity to point out that you can use ~root points to the root home dir,
            regardless of where it is.



            You can test that with



            $> echo  ~root
            /root


            So even thou /root will work on 99% on the systems out there ~root is probably more portable and will probably work on 100%.



            ~root/.bashrc





            share|improve this answer



















            • 1




              Sometimes it is in /home. It's best to use ~root/.bashrc to refer to the file in root's homedir.
              – grawity
              Apr 8 '11 at 19:39






            • 5




              The root home directory isn't in /home because in some *nix systems, /home is on a separate partition from the system drive and is not necessarily mounted.
              – CarlF
              Apr 8 '11 at 19:40










            • You highlight why I was so confused --- there is no /root/.bashrc on this build.
              – mbb
              Apr 10 '11 at 19:29










            • probably work on 100%, i almots completely understand
              – Mateus Viccari
              May 24 '17 at 22:34













            up vote
            12
            down vote










            up vote
            12
            down vote









            How about the home dir of root that is /root/?



            From some aspects, root is just another user (just better, and allowed more).
            root has a home dir, but it is not like the other users in /home/,
            but simply /root/ so root:s .bashrc is therefore /root/.bashrc



            The ones in /etc is system specific settings for all users, including root.





            Thanks to grawity to point out that you can use ~root points to the root home dir,
            regardless of where it is.



            You can test that with



            $> echo  ~root
            /root


            So even thou /root will work on 99% on the systems out there ~root is probably more portable and will probably work on 100%.



            ~root/.bashrc





            share|improve this answer














            How about the home dir of root that is /root/?



            From some aspects, root is just another user (just better, and allowed more).
            root has a home dir, but it is not like the other users in /home/,
            but simply /root/ so root:s .bashrc is therefore /root/.bashrc



            The ones in /etc is system specific settings for all users, including root.





            Thanks to grawity to point out that you can use ~root points to the root home dir,
            regardless of where it is.



            You can test that with



            $> echo  ~root
            /root


            So even thou /root will work on 99% on the systems out there ~root is probably more portable and will probably work on 100%.



            ~root/.bashrc






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Apr 9 '11 at 10:41

























            answered Apr 8 '11 at 19:24









            Johan

            3,57932249




            3,57932249








            • 1




              Sometimes it is in /home. It's best to use ~root/.bashrc to refer to the file in root's homedir.
              – grawity
              Apr 8 '11 at 19:39






            • 5




              The root home directory isn't in /home because in some *nix systems, /home is on a separate partition from the system drive and is not necessarily mounted.
              – CarlF
              Apr 8 '11 at 19:40










            • You highlight why I was so confused --- there is no /root/.bashrc on this build.
              – mbb
              Apr 10 '11 at 19:29










            • probably work on 100%, i almots completely understand
              – Mateus Viccari
              May 24 '17 at 22:34














            • 1




              Sometimes it is in /home. It's best to use ~root/.bashrc to refer to the file in root's homedir.
              – grawity
              Apr 8 '11 at 19:39






            • 5




              The root home directory isn't in /home because in some *nix systems, /home is on a separate partition from the system drive and is not necessarily mounted.
              – CarlF
              Apr 8 '11 at 19:40










            • You highlight why I was so confused --- there is no /root/.bashrc on this build.
              – mbb
              Apr 10 '11 at 19:29










            • probably work on 100%, i almots completely understand
              – Mateus Viccari
              May 24 '17 at 22:34








            1




            1




            Sometimes it is in /home. It's best to use ~root/.bashrc to refer to the file in root's homedir.
            – grawity
            Apr 8 '11 at 19:39




            Sometimes it is in /home. It's best to use ~root/.bashrc to refer to the file in root's homedir.
            – grawity
            Apr 8 '11 at 19:39




            5




            5




            The root home directory isn't in /home because in some *nix systems, /home is on a separate partition from the system drive and is not necessarily mounted.
            – CarlF
            Apr 8 '11 at 19:40




            The root home directory isn't in /home because in some *nix systems, /home is on a separate partition from the system drive and is not necessarily mounted.
            – CarlF
            Apr 8 '11 at 19:40












            You highlight why I was so confused --- there is no /root/.bashrc on this build.
            – mbb
            Apr 10 '11 at 19:29




            You highlight why I was so confused --- there is no /root/.bashrc on this build.
            – mbb
            Apr 10 '11 at 19:29












            probably work on 100%, i almots completely understand
            – Mateus Viccari
            May 24 '17 at 22:34




            probably work on 100%, i almots completely understand
            – Mateus Viccari
            May 24 '17 at 22:34










            up vote
            1
            down vote













            Instead of using /root/.bashrc try using /root/.profile — it's the same thing, just a different name.



            Also, if you are using su to get into root it may not be reading the .bashrc or .profile
            – just issuing su will not run the login scripts. try doing



            su -





            share|improve this answer



















            • 6




              I beg to differ that a profile and bashrc are "the same thing".
              – slhck
              Jun 27 '12 at 7:39










            • Works for ttylinux ver 14.1 [boomslang] , Linux kernel: 2.6.38.1
              – GeoMint
              Apr 3 at 12:51










            • @Slhck if they aren't the same thing, can you explain the differences? I'm a noob
              – Gabriel Fair
              Apr 20 at 17:35










            • @Gabriel superuser.com/questions/183870/…
              – slhck
              Apr 21 at 15:21















            up vote
            1
            down vote













            Instead of using /root/.bashrc try using /root/.profile — it's the same thing, just a different name.



            Also, if you are using su to get into root it may not be reading the .bashrc or .profile
            – just issuing su will not run the login scripts. try doing



            su -





            share|improve this answer



















            • 6




              I beg to differ that a profile and bashrc are "the same thing".
              – slhck
              Jun 27 '12 at 7:39










            • Works for ttylinux ver 14.1 [boomslang] , Linux kernel: 2.6.38.1
              – GeoMint
              Apr 3 at 12:51










            • @Slhck if they aren't the same thing, can you explain the differences? I'm a noob
              – Gabriel Fair
              Apr 20 at 17:35










            • @Gabriel superuser.com/questions/183870/…
              – slhck
              Apr 21 at 15:21













            up vote
            1
            down vote










            up vote
            1
            down vote









            Instead of using /root/.bashrc try using /root/.profile — it's the same thing, just a different name.



            Also, if you are using su to get into root it may not be reading the .bashrc or .profile
            – just issuing su will not run the login scripts. try doing



            su -





            share|improve this answer














            Instead of using /root/.bashrc try using /root/.profile — it's the same thing, just a different name.



            Also, if you are using su to get into root it may not be reading the .bashrc or .profile
            – just issuing su will not run the login scripts. try doing



            su -






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jun 27 '12 at 7:39









            slhck

            158k46434461




            158k46434461










            answered Jun 27 '12 at 2:27









            Jerome3k

            271




            271








            • 6




              I beg to differ that a profile and bashrc are "the same thing".
              – slhck
              Jun 27 '12 at 7:39










            • Works for ttylinux ver 14.1 [boomslang] , Linux kernel: 2.6.38.1
              – GeoMint
              Apr 3 at 12:51










            • @Slhck if they aren't the same thing, can you explain the differences? I'm a noob
              – Gabriel Fair
              Apr 20 at 17:35










            • @Gabriel superuser.com/questions/183870/…
              – slhck
              Apr 21 at 15:21














            • 6




              I beg to differ that a profile and bashrc are "the same thing".
              – slhck
              Jun 27 '12 at 7:39










            • Works for ttylinux ver 14.1 [boomslang] , Linux kernel: 2.6.38.1
              – GeoMint
              Apr 3 at 12:51










            • @Slhck if they aren't the same thing, can you explain the differences? I'm a noob
              – Gabriel Fair
              Apr 20 at 17:35










            • @Gabriel superuser.com/questions/183870/…
              – slhck
              Apr 21 at 15:21








            6




            6




            I beg to differ that a profile and bashrc are "the same thing".
            – slhck
            Jun 27 '12 at 7:39




            I beg to differ that a profile and bashrc are "the same thing".
            – slhck
            Jun 27 '12 at 7:39












            Works for ttylinux ver 14.1 [boomslang] , Linux kernel: 2.6.38.1
            – GeoMint
            Apr 3 at 12:51




            Works for ttylinux ver 14.1 [boomslang] , Linux kernel: 2.6.38.1
            – GeoMint
            Apr 3 at 12:51












            @Slhck if they aren't the same thing, can you explain the differences? I'm a noob
            – Gabriel Fair
            Apr 20 at 17:35




            @Slhck if they aren't the same thing, can you explain the differences? I'm a noob
            – Gabriel Fair
            Apr 20 at 17:35












            @Gabriel superuser.com/questions/183870/…
            – slhck
            Apr 21 at 15:21




            @Gabriel superuser.com/questions/183870/…
            – slhck
            Apr 21 at 15:21










            up vote
            0
            down vote













            Normally the .bashrc file for the root user should be there: /root/.bashrc

            If it is not the case, you can copy the 2 following files into /root, then you can edit the .bashrc file as you want.



            cp /etc/skel/.bash_profile /root
            cp /etc/skel/.bashrc /root





            share|improve this answer

























              up vote
              0
              down vote













              Normally the .bashrc file for the root user should be there: /root/.bashrc

              If it is not the case, you can copy the 2 following files into /root, then you can edit the .bashrc file as you want.



              cp /etc/skel/.bash_profile /root
              cp /etc/skel/.bashrc /root





              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                Normally the .bashrc file for the root user should be there: /root/.bashrc

                If it is not the case, you can copy the 2 following files into /root, then you can edit the .bashrc file as you want.



                cp /etc/skel/.bash_profile /root
                cp /etc/skel/.bashrc /root





                share|improve this answer












                Normally the .bashrc file for the root user should be there: /root/.bashrc

                If it is not the case, you can copy the 2 following files into /root, then you can edit the .bashrc file as you want.



                cp /etc/skel/.bash_profile /root
                cp /etc/skel/.bashrc /root






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 18 '14 at 7:40









                Nicolas

                560515




                560515






















                    up vote
                    0
                    down vote













                    The similar topic: Why suse doesn't have .bash_profile or .bashrc for root user



                    SuSe use /etc/bash.bashrc file to manage the environment. It's not indicated to add configs on this file, becouse when the server get updated, you'll lost your personal configuration.



                    You can create an archieve named bash.bashrc.local on /etc. The system will load any instruction found on this file, and then search for the default conf and execute both.



                    # vi /etc/bash.bashrc.local


                    Have fun!






                    share|improve this answer























                    • /etc/bash.bashrc for SuSE Linux PLEASE DO NOT CHANGE /etc/bash.bashrc There are chances that your changes will be lost during system upgrades. Instead use /etc/bash.bashrc.local for bash or /etc/ksh.kshrc.local for ksh or /etc/zsh.zshrc.local for the zsh or /etc/ash.ashrc.local for the plain ash bourne shell for your local settings, favourite global aliases, VISUAL and EDITOR variables, etc ...
                      – Leonardo Benevides
                      Nov 19 '15 at 13:35















                    up vote
                    0
                    down vote













                    The similar topic: Why suse doesn't have .bash_profile or .bashrc for root user



                    SuSe use /etc/bash.bashrc file to manage the environment. It's not indicated to add configs on this file, becouse when the server get updated, you'll lost your personal configuration.



                    You can create an archieve named bash.bashrc.local on /etc. The system will load any instruction found on this file, and then search for the default conf and execute both.



                    # vi /etc/bash.bashrc.local


                    Have fun!






                    share|improve this answer























                    • /etc/bash.bashrc for SuSE Linux PLEASE DO NOT CHANGE /etc/bash.bashrc There are chances that your changes will be lost during system upgrades. Instead use /etc/bash.bashrc.local for bash or /etc/ksh.kshrc.local for ksh or /etc/zsh.zshrc.local for the zsh or /etc/ash.ashrc.local for the plain ash bourne shell for your local settings, favourite global aliases, VISUAL and EDITOR variables, etc ...
                      – Leonardo Benevides
                      Nov 19 '15 at 13:35













                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    The similar topic: Why suse doesn't have .bash_profile or .bashrc for root user



                    SuSe use /etc/bash.bashrc file to manage the environment. It's not indicated to add configs on this file, becouse when the server get updated, you'll lost your personal configuration.



                    You can create an archieve named bash.bashrc.local on /etc. The system will load any instruction found on this file, and then search for the default conf and execute both.



                    # vi /etc/bash.bashrc.local


                    Have fun!






                    share|improve this answer














                    The similar topic: Why suse doesn't have .bash_profile or .bashrc for root user



                    SuSe use /etc/bash.bashrc file to manage the environment. It's not indicated to add configs on this file, becouse when the server get updated, you'll lost your personal configuration.



                    You can create an archieve named bash.bashrc.local on /etc. The system will load any instruction found on this file, and then search for the default conf and execute both.



                    # vi /etc/bash.bashrc.local


                    Have fun!







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Mar 20 '17 at 10:04









                    Community

                    1




                    1










                    answered Nov 19 '15 at 13:09









                    Leonardo Benevides

                    71




                    71












                    • /etc/bash.bashrc for SuSE Linux PLEASE DO NOT CHANGE /etc/bash.bashrc There are chances that your changes will be lost during system upgrades. Instead use /etc/bash.bashrc.local for bash or /etc/ksh.kshrc.local for ksh or /etc/zsh.zshrc.local for the zsh or /etc/ash.ashrc.local for the plain ash bourne shell for your local settings, favourite global aliases, VISUAL and EDITOR variables, etc ...
                      – Leonardo Benevides
                      Nov 19 '15 at 13:35


















                    • /etc/bash.bashrc for SuSE Linux PLEASE DO NOT CHANGE /etc/bash.bashrc There are chances that your changes will be lost during system upgrades. Instead use /etc/bash.bashrc.local for bash or /etc/ksh.kshrc.local for ksh or /etc/zsh.zshrc.local for the zsh or /etc/ash.ashrc.local for the plain ash bourne shell for your local settings, favourite global aliases, VISUAL and EDITOR variables, etc ...
                      – Leonardo Benevides
                      Nov 19 '15 at 13:35
















                    /etc/bash.bashrc for SuSE Linux PLEASE DO NOT CHANGE /etc/bash.bashrc There are chances that your changes will be lost during system upgrades. Instead use /etc/bash.bashrc.local for bash or /etc/ksh.kshrc.local for ksh or /etc/zsh.zshrc.local for the zsh or /etc/ash.ashrc.local for the plain ash bourne shell for your local settings, favourite global aliases, VISUAL and EDITOR variables, etc ...
                    – Leonardo Benevides
                    Nov 19 '15 at 13:35




                    /etc/bash.bashrc for SuSE Linux PLEASE DO NOT CHANGE /etc/bash.bashrc There are chances that your changes will be lost during system upgrades. Instead use /etc/bash.bashrc.local for bash or /etc/ksh.kshrc.local for ksh or /etc/zsh.zshrc.local for the zsh or /etc/ash.ashrc.local for the plain ash bourne shell for your local settings, favourite global aliases, VISUAL and EDITOR variables, etc ...
                    – Leonardo Benevides
                    Nov 19 '15 at 13:35










                    up vote
                    0
                    down vote













                    I looked here because on my (64-bit) Slackware 14.2, logging into root does most certainly NOT source /root/.bashrc. It DOES source /home/user/.bashrc on loggin to user account.
                    There is no /etc/bash.bashrc, or any other bash files in /etc.
                    Nor is there any such directory as /etc/skel apparently, in slack.






                    share|improve this answer





















                    • It's always nice to see some links to documentation.
                      – davidbaumann
                      Nov 19 at 15:04















                    up vote
                    0
                    down vote













                    I looked here because on my (64-bit) Slackware 14.2, logging into root does most certainly NOT source /root/.bashrc. It DOES source /home/user/.bashrc on loggin to user account.
                    There is no /etc/bash.bashrc, or any other bash files in /etc.
                    Nor is there any such directory as /etc/skel apparently, in slack.






                    share|improve this answer





















                    • It's always nice to see some links to documentation.
                      – davidbaumann
                      Nov 19 at 15:04













                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    I looked here because on my (64-bit) Slackware 14.2, logging into root does most certainly NOT source /root/.bashrc. It DOES source /home/user/.bashrc on loggin to user account.
                    There is no /etc/bash.bashrc, or any other bash files in /etc.
                    Nor is there any such directory as /etc/skel apparently, in slack.






                    share|improve this answer












                    I looked here because on my (64-bit) Slackware 14.2, logging into root does most certainly NOT source /root/.bashrc. It DOES source /home/user/.bashrc on loggin to user account.
                    There is no /etc/bash.bashrc, or any other bash files in /etc.
                    Nor is there any such directory as /etc/skel apparently, in slack.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 19 at 14:48









                    jrc

                    1




                    1












                    • It's always nice to see some links to documentation.
                      – davidbaumann
                      Nov 19 at 15:04


















                    • It's always nice to see some links to documentation.
                      – davidbaumann
                      Nov 19 at 15:04
















                    It's always nice to see some links to documentation.
                    – davidbaumann
                    Nov 19 at 15:04




                    It's always nice to see some links to documentation.
                    – davidbaumann
                    Nov 19 at 15:04


















                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f268460%2fwheres-bashrc-for-root%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

                    QoS: MAC-Priority for clients behind a repeater

                    Ивакино (Тотемский район)

                    Can't locate Autom4te/ChannelDefs.pm in @INC (when it definitely is there)