How to change the value of $SHELL variable?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I installed zsh a while back and later uninstalled it. But doing some django work today, I realized that my SHELL variable is set to:



$ echo $SHELL
/usr/bin/zsh


I found an answer saying that chsh -s /bin/bash should do the trick. But it didn't work in my case.







share|improve this question


























    up vote
    0
    down vote

    favorite












    I installed zsh a while back and later uninstalled it. But doing some django work today, I realized that my SHELL variable is set to:



    $ echo $SHELL
    /usr/bin/zsh


    I found an answer saying that chsh -s /bin/bash should do the trick. But it didn't work in my case.







    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I installed zsh a while back and later uninstalled it. But doing some django work today, I realized that my SHELL variable is set to:



      $ echo $SHELL
      /usr/bin/zsh


      I found an answer saying that chsh -s /bin/bash should do the trick. But it didn't work in my case.







      share|improve this question














      I installed zsh a while back and later uninstalled it. But doing some django work today, I realized that my SHELL variable is set to:



      $ echo $SHELL
      /usr/bin/zsh


      I found an answer saying that chsh -s /bin/bash should do the trick. But it didn't work in my case.









      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 15 at 18:48









      Thomas

      3,39741123




      3,39741123










      asked Mar 15 at 18:40









      Aviral Verma

      32




      32




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          The chsh command obviously did not do what it was supposed to do. From comments I learned that your login shell was still /usr/bin/zsh.



          The login shell can also be changed by manually editing the /etc/passwd file using the vipw command as root. Make sure that you enter the correct path to the shell you want to use, or you may not be able to log in properly.






          share|improve this answer






















          • that means the next time I log in, the $SHELL should be /bin/bash,right?
            – Aviral Verma
            Mar 15 at 18:46










          • @AviralVerma That is what I would expect.
            – Kusalananda
            Mar 15 at 18:47










          • That is not working here.Even after logging out and logging in, the variable is still set to user/bin/zsh
            – Aviral Verma
            Mar 15 at 18:48










          • @AviralVerma What does the entry in /etc/passwd say your login shell is? Do you execute zsh in your bash startup files?
            – Kusalananda
            Mar 15 at 18:50











          • the etc/passwd says /usr/bin/zsh to be my shell.I'm not sure I understand the second question there.
            – Aviral Verma
            Mar 15 at 18:52











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          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: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f430459%2fhow-to-change-the-value-of-shell-variable%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          The chsh command obviously did not do what it was supposed to do. From comments I learned that your login shell was still /usr/bin/zsh.



          The login shell can also be changed by manually editing the /etc/passwd file using the vipw command as root. Make sure that you enter the correct path to the shell you want to use, or you may not be able to log in properly.






          share|improve this answer






















          • that means the next time I log in, the $SHELL should be /bin/bash,right?
            – Aviral Verma
            Mar 15 at 18:46










          • @AviralVerma That is what I would expect.
            – Kusalananda
            Mar 15 at 18:47










          • That is not working here.Even after logging out and logging in, the variable is still set to user/bin/zsh
            – Aviral Verma
            Mar 15 at 18:48










          • @AviralVerma What does the entry in /etc/passwd say your login shell is? Do you execute zsh in your bash startup files?
            – Kusalananda
            Mar 15 at 18:50











          • the etc/passwd says /usr/bin/zsh to be my shell.I'm not sure I understand the second question there.
            – Aviral Verma
            Mar 15 at 18:52















          up vote
          0
          down vote



          accepted










          The chsh command obviously did not do what it was supposed to do. From comments I learned that your login shell was still /usr/bin/zsh.



          The login shell can also be changed by manually editing the /etc/passwd file using the vipw command as root. Make sure that you enter the correct path to the shell you want to use, or you may not be able to log in properly.






          share|improve this answer






















          • that means the next time I log in, the $SHELL should be /bin/bash,right?
            – Aviral Verma
            Mar 15 at 18:46










          • @AviralVerma That is what I would expect.
            – Kusalananda
            Mar 15 at 18:47










          • That is not working here.Even after logging out and logging in, the variable is still set to user/bin/zsh
            – Aviral Verma
            Mar 15 at 18:48










          • @AviralVerma What does the entry in /etc/passwd say your login shell is? Do you execute zsh in your bash startup files?
            – Kusalananda
            Mar 15 at 18:50











          • the etc/passwd says /usr/bin/zsh to be my shell.I'm not sure I understand the second question there.
            – Aviral Verma
            Mar 15 at 18:52













          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          The chsh command obviously did not do what it was supposed to do. From comments I learned that your login shell was still /usr/bin/zsh.



          The login shell can also be changed by manually editing the /etc/passwd file using the vipw command as root. Make sure that you enter the correct path to the shell you want to use, or you may not be able to log in properly.






          share|improve this answer














          The chsh command obviously did not do what it was supposed to do. From comments I learned that your login shell was still /usr/bin/zsh.



          The login shell can also be changed by manually editing the /etc/passwd file using the vipw command as root. Make sure that you enter the correct path to the shell you want to use, or you may not be able to log in properly.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 15 at 19:00

























          answered Mar 15 at 18:45









          Kusalananda

          103k13201317




          103k13201317











          • that means the next time I log in, the $SHELL should be /bin/bash,right?
            – Aviral Verma
            Mar 15 at 18:46










          • @AviralVerma That is what I would expect.
            – Kusalananda
            Mar 15 at 18:47










          • That is not working here.Even after logging out and logging in, the variable is still set to user/bin/zsh
            – Aviral Verma
            Mar 15 at 18:48










          • @AviralVerma What does the entry in /etc/passwd say your login shell is? Do you execute zsh in your bash startup files?
            – Kusalananda
            Mar 15 at 18:50











          • the etc/passwd says /usr/bin/zsh to be my shell.I'm not sure I understand the second question there.
            – Aviral Verma
            Mar 15 at 18:52

















          • that means the next time I log in, the $SHELL should be /bin/bash,right?
            – Aviral Verma
            Mar 15 at 18:46










          • @AviralVerma That is what I would expect.
            – Kusalananda
            Mar 15 at 18:47










          • That is not working here.Even after logging out and logging in, the variable is still set to user/bin/zsh
            – Aviral Verma
            Mar 15 at 18:48










          • @AviralVerma What does the entry in /etc/passwd say your login shell is? Do you execute zsh in your bash startup files?
            – Kusalananda
            Mar 15 at 18:50











          • the etc/passwd says /usr/bin/zsh to be my shell.I'm not sure I understand the second question there.
            – Aviral Verma
            Mar 15 at 18:52
















          that means the next time I log in, the $SHELL should be /bin/bash,right?
          – Aviral Verma
          Mar 15 at 18:46




          that means the next time I log in, the $SHELL should be /bin/bash,right?
          – Aviral Verma
          Mar 15 at 18:46












          @AviralVerma That is what I would expect.
          – Kusalananda
          Mar 15 at 18:47




          @AviralVerma That is what I would expect.
          – Kusalananda
          Mar 15 at 18:47












          That is not working here.Even after logging out and logging in, the variable is still set to user/bin/zsh
          – Aviral Verma
          Mar 15 at 18:48




          That is not working here.Even after logging out and logging in, the variable is still set to user/bin/zsh
          – Aviral Verma
          Mar 15 at 18:48












          @AviralVerma What does the entry in /etc/passwd say your login shell is? Do you execute zsh in your bash startup files?
          – Kusalananda
          Mar 15 at 18:50





          @AviralVerma What does the entry in /etc/passwd say your login shell is? Do you execute zsh in your bash startup files?
          – Kusalananda
          Mar 15 at 18:50













          the etc/passwd says /usr/bin/zsh to be my shell.I'm not sure I understand the second question there.
          – Aviral Verma
          Mar 15 at 18:52





          the etc/passwd says /usr/bin/zsh to be my shell.I'm not sure I understand the second question there.
          – Aviral Verma
          Mar 15 at 18:52













           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f430459%2fhow-to-change-the-value-of-shell-variable%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?