When was the environment variable PS1 created?

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











up vote
3
down vote

favorite












I've always seen reference to pwd as being very essential 'back in the day'. These days we have customized command prompts like PS1 that display the current directory and pwd is pretty outmoded. But when did the idea for ps1 get introduced into *nix systems? Watching this from the AT&T archives I can see that PS1 definitely did not exist in the seventies.







share|improve this question

























    up vote
    3
    down vote

    favorite












    I've always seen reference to pwd as being very essential 'back in the day'. These days we have customized command prompts like PS1 that display the current directory and pwd is pretty outmoded. But when did the idea for ps1 get introduced into *nix systems? Watching this from the AT&T archives I can see that PS1 definitely did not exist in the seventies.







    share|improve this question























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      I've always seen reference to pwd as being very essential 'back in the day'. These days we have customized command prompts like PS1 that display the current directory and pwd is pretty outmoded. But when did the idea for ps1 get introduced into *nix systems? Watching this from the AT&T archives I can see that PS1 definitely did not exist in the seventies.







      share|improve this question













      I've always seen reference to pwd as being very essential 'back in the day'. These days we have customized command prompts like PS1 that display the current directory and pwd is pretty outmoded. But when did the idea for ps1 get introduced into *nix systems? Watching this from the AT&T archives I can see that PS1 definitely did not exist in the seventies.









      share|improve this question












      share|improve this question




      share|improve this question








      edited May 29 at 15:03









      Kusalananda

      102k13199314




      102k13199314









      asked May 29 at 14:16









      malan

      454214




      454214




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          This variable is part of the shell, $PS1 is used in bash, the Bourne shell (sh) and the ksh, it is not used in the csh.



          The first UNIX shell was the Thompson Shell (which was also called sh like the later bourne shell, the Thompson Shell was often called osh on systems with both the Thompson and Bourne shell installed.) The Thompson shell used the variable $P for the prompt.



          Then the Bourne Shell was introduced which used $PS1 to set the prompt. ksh was based on the Bourne Shell, and also uses $PS1. The csh/tcsh used set prompt = <something>.



          So I think the first shell to use $PS1 was the Bourne Shell.



          Thompson Shell man page: https://etsh.io/man/osh.1.pdf



          Bourne Shell man page: http://heirloom.sourceforge.net/sh/sh.1.html






          share|improve this answer























          • If the Thompson Shell had a variable for the prompt, $P, why did they never customize a prompt to display the working directory?
            – malan
            May 29 at 15:06






          • 1




            You could do if you wanted to, I expect it just wasn't the convention back then. Remember they would have been using 80 character wide terminals where space was a bit more of a luxury.
            – rusty shackleford
            May 29 at 15:09






          • 2




            So let me add the final answer to when did PS1 first appear. It was 1976 in the Bourne Shell.
            – schily
            May 29 at 16:06










          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%2f446709%2fwhen-was-the-environment-variable-ps1-created%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
          2
          down vote



          accepted










          This variable is part of the shell, $PS1 is used in bash, the Bourne shell (sh) and the ksh, it is not used in the csh.



          The first UNIX shell was the Thompson Shell (which was also called sh like the later bourne shell, the Thompson Shell was often called osh on systems with both the Thompson and Bourne shell installed.) The Thompson shell used the variable $P for the prompt.



          Then the Bourne Shell was introduced which used $PS1 to set the prompt. ksh was based on the Bourne Shell, and also uses $PS1. The csh/tcsh used set prompt = <something>.



          So I think the first shell to use $PS1 was the Bourne Shell.



          Thompson Shell man page: https://etsh.io/man/osh.1.pdf



          Bourne Shell man page: http://heirloom.sourceforge.net/sh/sh.1.html






          share|improve this answer























          • If the Thompson Shell had a variable for the prompt, $P, why did they never customize a prompt to display the working directory?
            – malan
            May 29 at 15:06






          • 1




            You could do if you wanted to, I expect it just wasn't the convention back then. Remember they would have been using 80 character wide terminals where space was a bit more of a luxury.
            – rusty shackleford
            May 29 at 15:09






          • 2




            So let me add the final answer to when did PS1 first appear. It was 1976 in the Bourne Shell.
            – schily
            May 29 at 16:06














          up vote
          2
          down vote



          accepted










          This variable is part of the shell, $PS1 is used in bash, the Bourne shell (sh) and the ksh, it is not used in the csh.



          The first UNIX shell was the Thompson Shell (which was also called sh like the later bourne shell, the Thompson Shell was often called osh on systems with both the Thompson and Bourne shell installed.) The Thompson shell used the variable $P for the prompt.



          Then the Bourne Shell was introduced which used $PS1 to set the prompt. ksh was based on the Bourne Shell, and also uses $PS1. The csh/tcsh used set prompt = <something>.



          So I think the first shell to use $PS1 was the Bourne Shell.



          Thompson Shell man page: https://etsh.io/man/osh.1.pdf



          Bourne Shell man page: http://heirloom.sourceforge.net/sh/sh.1.html






          share|improve this answer























          • If the Thompson Shell had a variable for the prompt, $P, why did they never customize a prompt to display the working directory?
            – malan
            May 29 at 15:06






          • 1




            You could do if you wanted to, I expect it just wasn't the convention back then. Remember they would have been using 80 character wide terminals where space was a bit more of a luxury.
            – rusty shackleford
            May 29 at 15:09






          • 2




            So let me add the final answer to when did PS1 first appear. It was 1976 in the Bourne Shell.
            – schily
            May 29 at 16:06












          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          This variable is part of the shell, $PS1 is used in bash, the Bourne shell (sh) and the ksh, it is not used in the csh.



          The first UNIX shell was the Thompson Shell (which was also called sh like the later bourne shell, the Thompson Shell was often called osh on systems with both the Thompson and Bourne shell installed.) The Thompson shell used the variable $P for the prompt.



          Then the Bourne Shell was introduced which used $PS1 to set the prompt. ksh was based on the Bourne Shell, and also uses $PS1. The csh/tcsh used set prompt = <something>.



          So I think the first shell to use $PS1 was the Bourne Shell.



          Thompson Shell man page: https://etsh.io/man/osh.1.pdf



          Bourne Shell man page: http://heirloom.sourceforge.net/sh/sh.1.html






          share|improve this answer















          This variable is part of the shell, $PS1 is used in bash, the Bourne shell (sh) and the ksh, it is not used in the csh.



          The first UNIX shell was the Thompson Shell (which was also called sh like the later bourne shell, the Thompson Shell was often called osh on systems with both the Thompson and Bourne shell installed.) The Thompson shell used the variable $P for the prompt.



          Then the Bourne Shell was introduced which used $PS1 to set the prompt. ksh was based on the Bourne Shell, and also uses $PS1. The csh/tcsh used set prompt = <something>.



          So I think the first shell to use $PS1 was the Bourne Shell.



          Thompson Shell man page: https://etsh.io/man/osh.1.pdf



          Bourne Shell man page: http://heirloom.sourceforge.net/sh/sh.1.html







          share|improve this answer















          share|improve this answer



          share|improve this answer








          edited May 29 at 15:04


























          answered May 29 at 14:59









          rusty shackleford

          1,135115




          1,135115











          • If the Thompson Shell had a variable for the prompt, $P, why did they never customize a prompt to display the working directory?
            – malan
            May 29 at 15:06






          • 1




            You could do if you wanted to, I expect it just wasn't the convention back then. Remember they would have been using 80 character wide terminals where space was a bit more of a luxury.
            – rusty shackleford
            May 29 at 15:09






          • 2




            So let me add the final answer to when did PS1 first appear. It was 1976 in the Bourne Shell.
            – schily
            May 29 at 16:06
















          • If the Thompson Shell had a variable for the prompt, $P, why did they never customize a prompt to display the working directory?
            – malan
            May 29 at 15:06






          • 1




            You could do if you wanted to, I expect it just wasn't the convention back then. Remember they would have been using 80 character wide terminals where space was a bit more of a luxury.
            – rusty shackleford
            May 29 at 15:09






          • 2




            So let me add the final answer to when did PS1 first appear. It was 1976 in the Bourne Shell.
            – schily
            May 29 at 16:06















          If the Thompson Shell had a variable for the prompt, $P, why did they never customize a prompt to display the working directory?
          – malan
          May 29 at 15:06




          If the Thompson Shell had a variable for the prompt, $P, why did they never customize a prompt to display the working directory?
          – malan
          May 29 at 15:06




          1




          1




          You could do if you wanted to, I expect it just wasn't the convention back then. Remember they would have been using 80 character wide terminals where space was a bit more of a luxury.
          – rusty shackleford
          May 29 at 15:09




          You could do if you wanted to, I expect it just wasn't the convention back then. Remember they would have been using 80 character wide terminals where space was a bit more of a luxury.
          – rusty shackleford
          May 29 at 15:09




          2




          2




          So let me add the final answer to when did PS1 first appear. It was 1976 in the Bourne Shell.
          – schily
          May 29 at 16:06




          So let me add the final answer to when did PS1 first appear. It was 1976 in the Bourne Shell.
          – schily
          May 29 at 16:06












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446709%2fwhen-was-the-environment-variable-ps1-created%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?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay