What is the difference between standard syntax and BSD syntax?












20















I have seen many commands that accept a "BSD syntax" as well as their standard syntax. Take the ps command for one example:



To see every process on the system using standard syntax:
ps -e
ps -ef
ps -eF
ps -ely

To see every process on the system using BSD syntax:
ps ax
ps axu


So what is the difference between these two routes? In general when they say in BSD syntax what elements I should remember? Is this syntax just for those commands which they are in the BSD also?










share|improve this question

























  • To inquire into the historical differences between how systems through time implemented ps optargs is to stand at the edge of an abyss Man Was Not Meant to Know.

    – jdv
    Jan 14 at 16:31
















20















I have seen many commands that accept a "BSD syntax" as well as their standard syntax. Take the ps command for one example:



To see every process on the system using standard syntax:
ps -e
ps -ef
ps -eF
ps -ely

To see every process on the system using BSD syntax:
ps ax
ps axu


So what is the difference between these two routes? In general when they say in BSD syntax what elements I should remember? Is this syntax just for those commands which they are in the BSD also?










share|improve this question

























  • To inquire into the historical differences between how systems through time implemented ps optargs is to stand at the edge of an abyss Man Was Not Meant to Know.

    – jdv
    Jan 14 at 16:31














20












20








20


4






I have seen many commands that accept a "BSD syntax" as well as their standard syntax. Take the ps command for one example:



To see every process on the system using standard syntax:
ps -e
ps -ef
ps -eF
ps -ely

To see every process on the system using BSD syntax:
ps ax
ps axu


So what is the difference between these two routes? In general when they say in BSD syntax what elements I should remember? Is this syntax just for those commands which they are in the BSD also?










share|improve this question
















I have seen many commands that accept a "BSD syntax" as well as their standard syntax. Take the ps command for one example:



To see every process on the system using standard syntax:
ps -e
ps -ef
ps -eF
ps -ely

To see every process on the system using BSD syntax:
ps ax
ps axu


So what is the difference between these two routes? In general when they say in BSD syntax what elements I should remember? Is this syntax just for those commands which they are in the BSD also?







command-line syntax






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 18 '14 at 15:03









Oli

221k86558762




221k86558762










asked Jun 18 '14 at 11:18









Mohammad Reza RezwaniMohammad Reza Rezwani

3,6342359110




3,6342359110













  • To inquire into the historical differences between how systems through time implemented ps optargs is to stand at the edge of an abyss Man Was Not Meant to Know.

    – jdv
    Jan 14 at 16:31



















  • To inquire into the historical differences between how systems through time implemented ps optargs is to stand at the edge of an abyss Man Was Not Meant to Know.

    – jdv
    Jan 14 at 16:31

















To inquire into the historical differences between how systems through time implemented ps optargs is to stand at the edge of an abyss Man Was Not Meant to Know.

– jdv
Jan 14 at 16:31





To inquire into the historical differences between how systems through time implemented ps optargs is to stand at the edge of an abyss Man Was Not Meant to Know.

– jdv
Jan 14 at 16:31










4 Answers
4






active

oldest

votes


















18














What's the difference between MS Office and LibreOffice? Between Firefox and Chrome?

They do roughly the same thing, but they're by different people with slightly different aims.



Perhaps the better question is why do BSD, Linux, OSX and Unix distributions share so many commands? This boils down to POSIX compliance. POSIX is basically a set of standards for Unix-like operating systems; it stipulates the core API, the commands and how those commands should work.



In the case of ps (a POSIX-stipulated command) certain arguments are demanded. These include these BSD ones. All the POSIX-derived commands have their own man pages but they need a separate install. For ps:



sudo apt-get install manpages-posix
man 1posix ps


So why isn't BSD using our ps (or vice versa)?




  • Our ps package (procps see: dpkg -S $(which ps)) is a fork of another procps package. Both these are GPL licensed. This is incompatible with BSD's license so can't be included there. (We could include BSD's but don't need to).


  • ps is fairly kernel specific. I reckon they're technically incompatible.


What about other applications?



Most of the commands for POSIX compliance come from Ubuntu's coreutils package. This package represents the GNU in GNU/Linux and it too is GPL licensed. BSD ships its own BSD-compatible-licensed versions that adhere to POSIX but aren't necessarily completely the same as their GNU counterparts.



ps isn't the only POSIX command that isn't GNU. There are loads of them.



As I lead with, why should they be? They're by different people over a very, very long time. That's the short answer here.






share|improve this answer

































    19














    This dates back to the somewhat tortuous history of Unix (Wikipedia has a simplified diagram, which is far from complete). In particular, for a while, there were two major currents: System V developed by AT&T, and BSD developed at the University of California, Berkeley. This was around the early 1980s, long before Linux (1991), let alone Ubuntu (2004). Often these two currents made different decisions, and even today you'll find the occasional reference to “System V” and “BSD” variants or features.



    The ps command dates back from one of the first releases of Unix (it wasn't in version 1, the earliest man page I can find online is from version 5 (p.94) in 1974). At the time, ps just had a few options, for example ps a would display all processes instead of just the user's, and ps x would display processes with no terminal attached. You'll note that the options don't start with -: at the time, the convention of using - for options wasn't near-systematic like it is today, it was mostly a thing for commands that took file names as normal arguments.



    Over time, the various strands of Unix extended ps with many more options. The BSD variant chose to retain the original syntax, with no leading -, and a and x still exist today. The System V variant chose to adopt the syntactic convention of - for options, and used different letters (for example ps -e to display all processes). Oracle (formerly Sun) Solaris is an example of a System V variant (Solaris also ships a separate ps executable, in a directory which is not on the default PATH, for applications written with BSD in mind).



    At the time Linux came onto the scene, the people who used it would often have prior experience of one Unix variant or another. Linux sometimes did things the System V way, sometimes the BSD way, sometimes its own way, either based on technical considerations or based on the experience and tastes of whoever implemented the feature. Linux's ps command started out with BSD-like options, e.g. ps ae to display all processes and include environment variables in the listing. Over time (in the late 1990s, I don't remember exactly when), the authors of Linux's ps added options for people who were used to System V. So today either ps ax or ps -e will list all processes under Linux, and there is even an environment variable (PS_PERSONALITY) to make ps behave more like various Unix old Unix variants, for the sake of old scripts and people with set habits.



    People who used several Unix variants didn't like that they'd have to modify their programs and their habits when switching from one Unix variant to another. So there was an effort to standardize a subset of functionality. This led to the POSIX standard (led by the IEEE), which Ubuntu by and large follows. The first edition whose scope included the ps command came out in 1992; this one isn't available online, but the 1997 edition is. For the ps command, like in many other cases, POSIX adopted the System V way of doing things.



    The ps command's standard syntax is one that is compatible with both System V and POSIX. In addition, that syntax can be said to be standard because it uses - to introduce options by default. Some options exist only in one of the two syntaxes; fortunately they can be mixed in the same call.



    Generally speaking, “BSD” vs “System V” doesn't have any technical implication. It refers to history: “BSD” is whatever choice BSD made in the 1980s and thereabouts, “System V” is whatever choice AT&T and their partners (especially Sun) made. “POSIX” is whatever choice the IEEE standardization committee made.






    share|improve this answer

































      2














      The 'standard' syntax you're referring to is actually the GNU operating system that was developed in the 1980s. GNU-based utilities and philosophy were combined with the Linux kernel in order to develop most modern day Linux distributions (including Ubuntu).



      The BSD operating system was developed in the late 1970s, independent of GNU, and later branched into modern day versions like FreeBSD or OpenBSD.



      Both GNU and BSD are inspired by Unix and they have slightly different philosophies, syntax, etc.






      share|improve this answer































        0














        Ubuntu's coreutils is a collection of GNU-maintained applications that inclues a whole load of stuff (look at apt-cache show coreutils). BSDs have their own versions (GNU isn't compatible with the BSD license).






        share|improve this answer























          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          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',
          autoActivateHeartbeat: false,
          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%2faskubuntu.com%2fquestions%2f484982%2fwhat-is-the-difference-between-standard-syntax-and-bsd-syntax%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          4 Answers
          4






          active

          oldest

          votes








          4 Answers
          4






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          18














          What's the difference between MS Office and LibreOffice? Between Firefox and Chrome?

          They do roughly the same thing, but they're by different people with slightly different aims.



          Perhaps the better question is why do BSD, Linux, OSX and Unix distributions share so many commands? This boils down to POSIX compliance. POSIX is basically a set of standards for Unix-like operating systems; it stipulates the core API, the commands and how those commands should work.



          In the case of ps (a POSIX-stipulated command) certain arguments are demanded. These include these BSD ones. All the POSIX-derived commands have their own man pages but they need a separate install. For ps:



          sudo apt-get install manpages-posix
          man 1posix ps


          So why isn't BSD using our ps (or vice versa)?




          • Our ps package (procps see: dpkg -S $(which ps)) is a fork of another procps package. Both these are GPL licensed. This is incompatible with BSD's license so can't be included there. (We could include BSD's but don't need to).


          • ps is fairly kernel specific. I reckon they're technically incompatible.


          What about other applications?



          Most of the commands for POSIX compliance come from Ubuntu's coreutils package. This package represents the GNU in GNU/Linux and it too is GPL licensed. BSD ships its own BSD-compatible-licensed versions that adhere to POSIX but aren't necessarily completely the same as their GNU counterparts.



          ps isn't the only POSIX command that isn't GNU. There are loads of them.



          As I lead with, why should they be? They're by different people over a very, very long time. That's the short answer here.






          share|improve this answer






























            18














            What's the difference between MS Office and LibreOffice? Between Firefox and Chrome?

            They do roughly the same thing, but they're by different people with slightly different aims.



            Perhaps the better question is why do BSD, Linux, OSX and Unix distributions share so many commands? This boils down to POSIX compliance. POSIX is basically a set of standards for Unix-like operating systems; it stipulates the core API, the commands and how those commands should work.



            In the case of ps (a POSIX-stipulated command) certain arguments are demanded. These include these BSD ones. All the POSIX-derived commands have their own man pages but they need a separate install. For ps:



            sudo apt-get install manpages-posix
            man 1posix ps


            So why isn't BSD using our ps (or vice versa)?




            • Our ps package (procps see: dpkg -S $(which ps)) is a fork of another procps package. Both these are GPL licensed. This is incompatible with BSD's license so can't be included there. (We could include BSD's but don't need to).


            • ps is fairly kernel specific. I reckon they're technically incompatible.


            What about other applications?



            Most of the commands for POSIX compliance come from Ubuntu's coreutils package. This package represents the GNU in GNU/Linux and it too is GPL licensed. BSD ships its own BSD-compatible-licensed versions that adhere to POSIX but aren't necessarily completely the same as their GNU counterparts.



            ps isn't the only POSIX command that isn't GNU. There are loads of them.



            As I lead with, why should they be? They're by different people over a very, very long time. That's the short answer here.






            share|improve this answer




























              18












              18








              18







              What's the difference between MS Office and LibreOffice? Between Firefox and Chrome?

              They do roughly the same thing, but they're by different people with slightly different aims.



              Perhaps the better question is why do BSD, Linux, OSX and Unix distributions share so many commands? This boils down to POSIX compliance. POSIX is basically a set of standards for Unix-like operating systems; it stipulates the core API, the commands and how those commands should work.



              In the case of ps (a POSIX-stipulated command) certain arguments are demanded. These include these BSD ones. All the POSIX-derived commands have their own man pages but they need a separate install. For ps:



              sudo apt-get install manpages-posix
              man 1posix ps


              So why isn't BSD using our ps (or vice versa)?




              • Our ps package (procps see: dpkg -S $(which ps)) is a fork of another procps package. Both these are GPL licensed. This is incompatible with BSD's license so can't be included there. (We could include BSD's but don't need to).


              • ps is fairly kernel specific. I reckon they're technically incompatible.


              What about other applications?



              Most of the commands for POSIX compliance come from Ubuntu's coreutils package. This package represents the GNU in GNU/Linux and it too is GPL licensed. BSD ships its own BSD-compatible-licensed versions that adhere to POSIX but aren't necessarily completely the same as their GNU counterparts.



              ps isn't the only POSIX command that isn't GNU. There are loads of them.



              As I lead with, why should they be? They're by different people over a very, very long time. That's the short answer here.






              share|improve this answer















              What's the difference between MS Office and LibreOffice? Between Firefox and Chrome?

              They do roughly the same thing, but they're by different people with slightly different aims.



              Perhaps the better question is why do BSD, Linux, OSX and Unix distributions share so many commands? This boils down to POSIX compliance. POSIX is basically a set of standards for Unix-like operating systems; it stipulates the core API, the commands and how those commands should work.



              In the case of ps (a POSIX-stipulated command) certain arguments are demanded. These include these BSD ones. All the POSIX-derived commands have their own man pages but they need a separate install. For ps:



              sudo apt-get install manpages-posix
              man 1posix ps


              So why isn't BSD using our ps (or vice versa)?




              • Our ps package (procps see: dpkg -S $(which ps)) is a fork of another procps package. Both these are GPL licensed. This is incompatible with BSD's license so can't be included there. (We could include BSD's but don't need to).


              • ps is fairly kernel specific. I reckon they're technically incompatible.


              What about other applications?



              Most of the commands for POSIX compliance come from Ubuntu's coreutils package. This package represents the GNU in GNU/Linux and it too is GPL licensed. BSD ships its own BSD-compatible-licensed versions that adhere to POSIX but aren't necessarily completely the same as their GNU counterparts.



              ps isn't the only POSIX command that isn't GNU. There are loads of them.



              As I lead with, why should they be? They're by different people over a very, very long time. That's the short answer here.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Apr 13 '17 at 12:24









              Community

              1




              1










              answered Jun 18 '14 at 11:35









              OliOli

              221k86558762




              221k86558762

























                  19














                  This dates back to the somewhat tortuous history of Unix (Wikipedia has a simplified diagram, which is far from complete). In particular, for a while, there were two major currents: System V developed by AT&T, and BSD developed at the University of California, Berkeley. This was around the early 1980s, long before Linux (1991), let alone Ubuntu (2004). Often these two currents made different decisions, and even today you'll find the occasional reference to “System V” and “BSD” variants or features.



                  The ps command dates back from one of the first releases of Unix (it wasn't in version 1, the earliest man page I can find online is from version 5 (p.94) in 1974). At the time, ps just had a few options, for example ps a would display all processes instead of just the user's, and ps x would display processes with no terminal attached. You'll note that the options don't start with -: at the time, the convention of using - for options wasn't near-systematic like it is today, it was mostly a thing for commands that took file names as normal arguments.



                  Over time, the various strands of Unix extended ps with many more options. The BSD variant chose to retain the original syntax, with no leading -, and a and x still exist today. The System V variant chose to adopt the syntactic convention of - for options, and used different letters (for example ps -e to display all processes). Oracle (formerly Sun) Solaris is an example of a System V variant (Solaris also ships a separate ps executable, in a directory which is not on the default PATH, for applications written with BSD in mind).



                  At the time Linux came onto the scene, the people who used it would often have prior experience of one Unix variant or another. Linux sometimes did things the System V way, sometimes the BSD way, sometimes its own way, either based on technical considerations or based on the experience and tastes of whoever implemented the feature. Linux's ps command started out with BSD-like options, e.g. ps ae to display all processes and include environment variables in the listing. Over time (in the late 1990s, I don't remember exactly when), the authors of Linux's ps added options for people who were used to System V. So today either ps ax or ps -e will list all processes under Linux, and there is even an environment variable (PS_PERSONALITY) to make ps behave more like various Unix old Unix variants, for the sake of old scripts and people with set habits.



                  People who used several Unix variants didn't like that they'd have to modify their programs and their habits when switching from one Unix variant to another. So there was an effort to standardize a subset of functionality. This led to the POSIX standard (led by the IEEE), which Ubuntu by and large follows. The first edition whose scope included the ps command came out in 1992; this one isn't available online, but the 1997 edition is. For the ps command, like in many other cases, POSIX adopted the System V way of doing things.



                  The ps command's standard syntax is one that is compatible with both System V and POSIX. In addition, that syntax can be said to be standard because it uses - to introduce options by default. Some options exist only in one of the two syntaxes; fortunately they can be mixed in the same call.



                  Generally speaking, “BSD” vs “System V” doesn't have any technical implication. It refers to history: “BSD” is whatever choice BSD made in the 1980s and thereabouts, “System V” is whatever choice AT&T and their partners (especially Sun) made. “POSIX” is whatever choice the IEEE standardization committee made.






                  share|improve this answer






























                    19














                    This dates back to the somewhat tortuous history of Unix (Wikipedia has a simplified diagram, which is far from complete). In particular, for a while, there were two major currents: System V developed by AT&T, and BSD developed at the University of California, Berkeley. This was around the early 1980s, long before Linux (1991), let alone Ubuntu (2004). Often these two currents made different decisions, and even today you'll find the occasional reference to “System V” and “BSD” variants or features.



                    The ps command dates back from one of the first releases of Unix (it wasn't in version 1, the earliest man page I can find online is from version 5 (p.94) in 1974). At the time, ps just had a few options, for example ps a would display all processes instead of just the user's, and ps x would display processes with no terminal attached. You'll note that the options don't start with -: at the time, the convention of using - for options wasn't near-systematic like it is today, it was mostly a thing for commands that took file names as normal arguments.



                    Over time, the various strands of Unix extended ps with many more options. The BSD variant chose to retain the original syntax, with no leading -, and a and x still exist today. The System V variant chose to adopt the syntactic convention of - for options, and used different letters (for example ps -e to display all processes). Oracle (formerly Sun) Solaris is an example of a System V variant (Solaris also ships a separate ps executable, in a directory which is not on the default PATH, for applications written with BSD in mind).



                    At the time Linux came onto the scene, the people who used it would often have prior experience of one Unix variant or another. Linux sometimes did things the System V way, sometimes the BSD way, sometimes its own way, either based on technical considerations or based on the experience and tastes of whoever implemented the feature. Linux's ps command started out with BSD-like options, e.g. ps ae to display all processes and include environment variables in the listing. Over time (in the late 1990s, I don't remember exactly when), the authors of Linux's ps added options for people who were used to System V. So today either ps ax or ps -e will list all processes under Linux, and there is even an environment variable (PS_PERSONALITY) to make ps behave more like various Unix old Unix variants, for the sake of old scripts and people with set habits.



                    People who used several Unix variants didn't like that they'd have to modify their programs and their habits when switching from one Unix variant to another. So there was an effort to standardize a subset of functionality. This led to the POSIX standard (led by the IEEE), which Ubuntu by and large follows. The first edition whose scope included the ps command came out in 1992; this one isn't available online, but the 1997 edition is. For the ps command, like in many other cases, POSIX adopted the System V way of doing things.



                    The ps command's standard syntax is one that is compatible with both System V and POSIX. In addition, that syntax can be said to be standard because it uses - to introduce options by default. Some options exist only in one of the two syntaxes; fortunately they can be mixed in the same call.



                    Generally speaking, “BSD” vs “System V” doesn't have any technical implication. It refers to history: “BSD” is whatever choice BSD made in the 1980s and thereabouts, “System V” is whatever choice AT&T and their partners (especially Sun) made. “POSIX” is whatever choice the IEEE standardization committee made.






                    share|improve this answer




























                      19












                      19








                      19







                      This dates back to the somewhat tortuous history of Unix (Wikipedia has a simplified diagram, which is far from complete). In particular, for a while, there were two major currents: System V developed by AT&T, and BSD developed at the University of California, Berkeley. This was around the early 1980s, long before Linux (1991), let alone Ubuntu (2004). Often these two currents made different decisions, and even today you'll find the occasional reference to “System V” and “BSD” variants or features.



                      The ps command dates back from one of the first releases of Unix (it wasn't in version 1, the earliest man page I can find online is from version 5 (p.94) in 1974). At the time, ps just had a few options, for example ps a would display all processes instead of just the user's, and ps x would display processes with no terminal attached. You'll note that the options don't start with -: at the time, the convention of using - for options wasn't near-systematic like it is today, it was mostly a thing for commands that took file names as normal arguments.



                      Over time, the various strands of Unix extended ps with many more options. The BSD variant chose to retain the original syntax, with no leading -, and a and x still exist today. The System V variant chose to adopt the syntactic convention of - for options, and used different letters (for example ps -e to display all processes). Oracle (formerly Sun) Solaris is an example of a System V variant (Solaris also ships a separate ps executable, in a directory which is not on the default PATH, for applications written with BSD in mind).



                      At the time Linux came onto the scene, the people who used it would often have prior experience of one Unix variant or another. Linux sometimes did things the System V way, sometimes the BSD way, sometimes its own way, either based on technical considerations or based on the experience and tastes of whoever implemented the feature. Linux's ps command started out with BSD-like options, e.g. ps ae to display all processes and include environment variables in the listing. Over time (in the late 1990s, I don't remember exactly when), the authors of Linux's ps added options for people who were used to System V. So today either ps ax or ps -e will list all processes under Linux, and there is even an environment variable (PS_PERSONALITY) to make ps behave more like various Unix old Unix variants, for the sake of old scripts and people with set habits.



                      People who used several Unix variants didn't like that they'd have to modify their programs and their habits when switching from one Unix variant to another. So there was an effort to standardize a subset of functionality. This led to the POSIX standard (led by the IEEE), which Ubuntu by and large follows. The first edition whose scope included the ps command came out in 1992; this one isn't available online, but the 1997 edition is. For the ps command, like in many other cases, POSIX adopted the System V way of doing things.



                      The ps command's standard syntax is one that is compatible with both System V and POSIX. In addition, that syntax can be said to be standard because it uses - to introduce options by default. Some options exist only in one of the two syntaxes; fortunately they can be mixed in the same call.



                      Generally speaking, “BSD” vs “System V” doesn't have any technical implication. It refers to history: “BSD” is whatever choice BSD made in the 1980s and thereabouts, “System V” is whatever choice AT&T and their partners (especially Sun) made. “POSIX” is whatever choice the IEEE standardization committee made.






                      share|improve this answer















                      This dates back to the somewhat tortuous history of Unix (Wikipedia has a simplified diagram, which is far from complete). In particular, for a while, there were two major currents: System V developed by AT&T, and BSD developed at the University of California, Berkeley. This was around the early 1980s, long before Linux (1991), let alone Ubuntu (2004). Often these two currents made different decisions, and even today you'll find the occasional reference to “System V” and “BSD” variants or features.



                      The ps command dates back from one of the first releases of Unix (it wasn't in version 1, the earliest man page I can find online is from version 5 (p.94) in 1974). At the time, ps just had a few options, for example ps a would display all processes instead of just the user's, and ps x would display processes with no terminal attached. You'll note that the options don't start with -: at the time, the convention of using - for options wasn't near-systematic like it is today, it was mostly a thing for commands that took file names as normal arguments.



                      Over time, the various strands of Unix extended ps with many more options. The BSD variant chose to retain the original syntax, with no leading -, and a and x still exist today. The System V variant chose to adopt the syntactic convention of - for options, and used different letters (for example ps -e to display all processes). Oracle (formerly Sun) Solaris is an example of a System V variant (Solaris also ships a separate ps executable, in a directory which is not on the default PATH, for applications written with BSD in mind).



                      At the time Linux came onto the scene, the people who used it would often have prior experience of one Unix variant or another. Linux sometimes did things the System V way, sometimes the BSD way, sometimes its own way, either based on technical considerations or based on the experience and tastes of whoever implemented the feature. Linux's ps command started out with BSD-like options, e.g. ps ae to display all processes and include environment variables in the listing. Over time (in the late 1990s, I don't remember exactly when), the authors of Linux's ps added options for people who were used to System V. So today either ps ax or ps -e will list all processes under Linux, and there is even an environment variable (PS_PERSONALITY) to make ps behave more like various Unix old Unix variants, for the sake of old scripts and people with set habits.



                      People who used several Unix variants didn't like that they'd have to modify their programs and their habits when switching from one Unix variant to another. So there was an effort to standardize a subset of functionality. This led to the POSIX standard (led by the IEEE), which Ubuntu by and large follows. The first edition whose scope included the ps command came out in 1992; this one isn't available online, but the 1997 edition is. For the ps command, like in many other cases, POSIX adopted the System V way of doing things.



                      The ps command's standard syntax is one that is compatible with both System V and POSIX. In addition, that syntax can be said to be standard because it uses - to introduce options by default. Some options exist only in one of the two syntaxes; fortunately they can be mixed in the same call.



                      Generally speaking, “BSD” vs “System V” doesn't have any technical implication. It refers to history: “BSD” is whatever choice BSD made in the 1980s and thereabouts, “System V” is whatever choice AT&T and their partners (especially Sun) made. “POSIX” is whatever choice the IEEE standardization committee made.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Jan 14 at 16:15









                      DanBuffington

                      31




                      31










                      answered Jun 18 '14 at 15:18









                      GillesGilles

                      44.7k13101140




                      44.7k13101140























                          2














                          The 'standard' syntax you're referring to is actually the GNU operating system that was developed in the 1980s. GNU-based utilities and philosophy were combined with the Linux kernel in order to develop most modern day Linux distributions (including Ubuntu).



                          The BSD operating system was developed in the late 1970s, independent of GNU, and later branched into modern day versions like FreeBSD or OpenBSD.



                          Both GNU and BSD are inspired by Unix and they have slightly different philosophies, syntax, etc.






                          share|improve this answer




























                            2














                            The 'standard' syntax you're referring to is actually the GNU operating system that was developed in the 1980s. GNU-based utilities and philosophy were combined with the Linux kernel in order to develop most modern day Linux distributions (including Ubuntu).



                            The BSD operating system was developed in the late 1970s, independent of GNU, and later branched into modern day versions like FreeBSD or OpenBSD.



                            Both GNU and BSD are inspired by Unix and they have slightly different philosophies, syntax, etc.






                            share|improve this answer


























                              2












                              2








                              2







                              The 'standard' syntax you're referring to is actually the GNU operating system that was developed in the 1980s. GNU-based utilities and philosophy were combined with the Linux kernel in order to develop most modern day Linux distributions (including Ubuntu).



                              The BSD operating system was developed in the late 1970s, independent of GNU, and later branched into modern day versions like FreeBSD or OpenBSD.



                              Both GNU and BSD are inspired by Unix and they have slightly different philosophies, syntax, etc.






                              share|improve this answer













                              The 'standard' syntax you're referring to is actually the GNU operating system that was developed in the 1980s. GNU-based utilities and philosophy were combined with the Linux kernel in order to develop most modern day Linux distributions (including Ubuntu).



                              The BSD operating system was developed in the late 1970s, independent of GNU, and later branched into modern day versions like FreeBSD or OpenBSD.



                              Both GNU and BSD are inspired by Unix and they have slightly different philosophies, syntax, etc.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jun 18 '14 at 11:32









                              Alex BAlex B

                              662




                              662























                                  0














                                  Ubuntu's coreutils is a collection of GNU-maintained applications that inclues a whole load of stuff (look at apt-cache show coreutils). BSDs have their own versions (GNU isn't compatible with the BSD license).






                                  share|improve this answer




























                                    0














                                    Ubuntu's coreutils is a collection of GNU-maintained applications that inclues a whole load of stuff (look at apt-cache show coreutils). BSDs have their own versions (GNU isn't compatible with the BSD license).






                                    share|improve this answer


























                                      0












                                      0








                                      0







                                      Ubuntu's coreutils is a collection of GNU-maintained applications that inclues a whole load of stuff (look at apt-cache show coreutils). BSDs have their own versions (GNU isn't compatible with the BSD license).






                                      share|improve this answer













                                      Ubuntu's coreutils is a collection of GNU-maintained applications that inclues a whole load of stuff (look at apt-cache show coreutils). BSDs have their own versions (GNU isn't compatible with the BSD license).







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Jun 18 '14 at 15:18









                                      HadiHadi

                                      12




                                      12






























                                          draft saved

                                          draft discarded




















































                                          Thanks for contributing an answer to Ask Ubuntu!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f484982%2fwhat-is-the-difference-between-standard-syntax-and-bsd-syntax%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

                                          How did Captain America manage to do this?

                                          迪纳利

                                          南乌拉尔铁路局