Do the common programs (for example: “ls”, “cat”) in Linux and BSD come from the same source code?2019 Community Moderator ElectionWere all Unix commands re-written in Linux?Are there still systems around with a /bin/sh binary?ip vs ifconfig commands pros and consSlightly confused about whether printf in the yash shell is a built-in command or notsu vs su - (on Debian): why is PATH the same?debian su - and su $PATH differences?Double square brackets for FreeBSDIs the GNU Coreutils copied from Unix?-c and -b options not working in mailx in ubuntuHow to compile and install programs from sourceWhere can I find the source code for `uptime`?How to create my own Linux distro (say from ubuntu source code)?Where to place source code for applications compiled from source?What is the difference between Unix, Linux, BSD and GNU?How to modify source code of collection of programs of a GNU/Linux OS?Why are there different types of linux distributions? What makes them unique, fundamentally?Source code of the patches for ShellshockMultibooting with LVMWhere can I find the source code specifically for the minimal debian installer cd?

What is the significance behind "40 days" that often appears in the Bible?

Why do newer 737s use two different styles of split winglets?

How difficult is it to simply disable/disengage the MCAS on Boeing 737 Max 8 & 9 Aircraft?

This word with a lot of past tenses

Am I eligible for the Eurail Youth pass? I am 27.5 years old

Four married couples attend a party. Each person shakes hands with every other person, except their own spouse, exactly once. How many handshakes?

Could this Scherzo by Beethoven be considered to be a fugue?

Math equation in non italic font

Employee lack of ownership

centering a caption under a table

How to make healing in an exploration game interesting

Have the tides ever turned twice on any open problem?

What is signal ground

Had had (Is it a past perfect or past simple)

Describing a chess game in a novel

Different outputs for `w`, `who`, `whoami` and `id`

What is better - deleting a copy constructor as private or public?

Are ETF trackers fundamentally better than individual stocks?

What are substitutions for coconut in curry?

What's the meaning of a knight fighting a snail in medieval book illustrations?

How to get the n-th line after a grepped one?

Python if-else code style for reduced code for rounding floats

I am trying to parse json data using jq

How are passwords stolen from companies if they only store hashes?



Do the common programs (for example: “ls”, “cat”) in Linux and BSD come from the same source code?



2019 Community Moderator ElectionWere all Unix commands re-written in Linux?Are there still systems around with a /bin/sh binary?ip vs ifconfig commands pros and consSlightly confused about whether printf in the yash shell is a built-in command or notsu vs su - (on Debian): why is PATH the same?debian su - and su $PATH differences?Double square brackets for FreeBSDIs the GNU Coreutils copied from Unix?-c and -b options not working in mailx in ubuntuHow to compile and install programs from sourceWhere can I find the source code for `uptime`?How to create my own Linux distro (say from ubuntu source code)?Where to place source code for applications compiled from source?What is the difference between Unix, Linux, BSD and GNU?How to modify source code of collection of programs of a GNU/Linux OS?Why are there different types of linux distributions? What makes them unique, fundamentally?Source code of the patches for ShellshockMultibooting with LVMWhere can I find the source code specifically for the minimal debian installer cd?










24















Both Linux and BSD have common programs like ls and cat and echo and kill.



Do they come from the same source code, or do both and Linux and BSD own their own unique source code for these programs?










share|improve this question









New contributor




user341875 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 10





    Linux kernel itself doesn't have such code, it's just kernel. Depending on what kind of tool you use, these tools may or may not come from the same source code, fun fact is, they're usually not.

    – 炸鱼薯条德里克
    2 days ago






  • 1





    Most tools have at least a BSD or Gnu heritage, then there are some originating from the Linux community or embedded projects (busybox). There are nearly no low level commands with a single implementation (but this is often the case for applications, related to naming rights)

    – eckes
    2 days ago






  • 4





    Possible duplicate of Were all Unix commands re-written in Linux?

    – a CVn
    yesterday















24















Both Linux and BSD have common programs like ls and cat and echo and kill.



Do they come from the same source code, or do both and Linux and BSD own their own unique source code for these programs?










share|improve this question









New contributor




user341875 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 10





    Linux kernel itself doesn't have such code, it's just kernel. Depending on what kind of tool you use, these tools may or may not come from the same source code, fun fact is, they're usually not.

    – 炸鱼薯条德里克
    2 days ago






  • 1





    Most tools have at least a BSD or Gnu heritage, then there are some originating from the Linux community or embedded projects (busybox). There are nearly no low level commands with a single implementation (but this is often the case for applications, related to naming rights)

    – eckes
    2 days ago






  • 4





    Possible duplicate of Were all Unix commands re-written in Linux?

    – a CVn
    yesterday













24












24








24


7






Both Linux and BSD have common programs like ls and cat and echo and kill.



Do they come from the same source code, or do both and Linux and BSD own their own unique source code for these programs?










share|improve this question









New contributor




user341875 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












Both Linux and BSD have common programs like ls and cat and echo and kill.



Do they come from the same source code, or do both and Linux and BSD own their own unique source code for these programs?







linux source bsd






share|improve this question









New contributor




user341875 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




user341875 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited yesterday









Sergiy Kolodyazhnyy

10.6k42763




10.6k42763






New contributor




user341875 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









user341875user341875

12413




12413




New contributor




user341875 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





user341875 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






user341875 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 10





    Linux kernel itself doesn't have such code, it's just kernel. Depending on what kind of tool you use, these tools may or may not come from the same source code, fun fact is, they're usually not.

    – 炸鱼薯条德里克
    2 days ago






  • 1





    Most tools have at least a BSD or Gnu heritage, then there are some originating from the Linux community or embedded projects (busybox). There are nearly no low level commands with a single implementation (but this is often the case for applications, related to naming rights)

    – eckes
    2 days ago






  • 4





    Possible duplicate of Were all Unix commands re-written in Linux?

    – a CVn
    yesterday












  • 10





    Linux kernel itself doesn't have such code, it's just kernel. Depending on what kind of tool you use, these tools may or may not come from the same source code, fun fact is, they're usually not.

    – 炸鱼薯条德里克
    2 days ago






  • 1





    Most tools have at least a BSD or Gnu heritage, then there are some originating from the Linux community or embedded projects (busybox). There are nearly no low level commands with a single implementation (but this is often the case for applications, related to naming rights)

    – eckes
    2 days ago






  • 4





    Possible duplicate of Were all Unix commands re-written in Linux?

    – a CVn
    yesterday







10




10





Linux kernel itself doesn't have such code, it's just kernel. Depending on what kind of tool you use, these tools may or may not come from the same source code, fun fact is, they're usually not.

– 炸鱼薯条德里克
2 days ago





Linux kernel itself doesn't have such code, it's just kernel. Depending on what kind of tool you use, these tools may or may not come from the same source code, fun fact is, they're usually not.

– 炸鱼薯条德里克
2 days ago




1




1





Most tools have at least a BSD or Gnu heritage, then there are some originating from the Linux community or embedded projects (busybox). There are nearly no low level commands with a single implementation (but this is often the case for applications, related to naming rights)

– eckes
2 days ago





Most tools have at least a BSD or Gnu heritage, then there are some originating from the Linux community or embedded projects (busybox). There are nearly no low level commands with a single implementation (but this is often the case for applications, related to naming rights)

– eckes
2 days ago




4




4





Possible duplicate of Were all Unix commands re-written in Linux?

– a CVn
yesterday





Possible duplicate of Were all Unix commands re-written in Linux?

– a CVn
yesterday










5 Answers
5






active

oldest

votes


















38














Linux is a kernel. It does not have the code for applications programs in the first place.



Linux-based operating systems do not even necessarily use the same source code as one another, let alone the same code as on the BSDs. There are famously multiple implementations of several fairly basic programs.



These include, but are not limited to:




  • ifconfig had 2 implementations, one in GNU inetutils and the other in NET-3 net-tools. It now has 3, the third being mine. (See https://unix.stackexchange.com/a/504084/5132.)


  • su has 2 implementations, one in util-linux and the other in shadow. Debian switched from one to the other in 2018, making several old questions and answers here on this WWW site wrong. (See https://unix.stackexchange.com/a/460769/5132 and, for one example, "su vs su - (on Debian): why is PATH the same?".)

  • There are seemingly umpteen (actually 4 on Debian/Ubuntu) possible places whence one can obtain the mailx command: GNU Mailutils, BSD mailx, NMH, and s-nail. (See https://unix.stackexchange.com/a/489510/5132.)

The BSDs are operating systems. They do contain the code for these programs. However, there is no single BSD operating system, and the code for such programs does sometimes vary amongst NetBSD, FreeBSD, OpenBSD, and DragonFly BSD. Moreover, it is definitely different to the code used for the several Linux-based operating systems.



Famously, Apple/NeXT used BSD applications softwares in MacOS/NeXTSTEP but enhanced several programs to support ACLs in ways different to the ways that the (other) BSDs did. One sets access controls using the chmod command, for example. So the Darwin versions of these commands are different yet again.



There are three added twists.



Programs like kill and echo are usually shell builtins. So the code for these commands varies according to what shell you are using, rather than what operating system.



Then there are BusyBox and ToyBox, available both for Linux-based operating systems and the BSDs and even used as the primary implementations of such commands on a few of the former, which have their own implementations of many commands.



Then there is OpenSolaris, from which come the likes of Illumos and Schillix, with the Solaris implementations of all of these tools, which is different yet again.



There are whole histories here, encompassing the original split between BSD and AT&T Unix, through the efforts to "PD" clone many Unix programs in the late 1980s and 1990s, around three decades of shuffling around after that, the whole open-source release of the code for Solaris, and OpenBSD's reimplementations of several things. Even the histories of tools that one might be misled into thinking have one implementation such as cron (which a lot of people erroneously think is the original Unix tool, or erroneously think is at least one single flavour written as "PD cron" by Paul Vixie in 1987, or do not realize has workalike replacements written by other people in the years since) are non-trivial.






share|improve this answer




















  • 2





    There's even PacBSD which is BSD user on Linux kernel...

    – Mehrdad
    2 days ago











  • BSD was to my knowledged used in Mac OS X/NextStep because the license allowed them to use it with closed source software. NeXTStep included instructions for getting the source for the open source components. The same reasoning may have been used in Linux for providing a GPL userland with a GPL kernel.

    – Thorbjørn Ravn Andersen
    yesterday











  • Good answer, but it would benefit from a little explanation of the origins of the common Linux userlands.

    – Russell Borogove
    yesterday






  • 1





    That's really beyond the scope here, and should be a Q&A in its own right. We even have some such Q&As already. Consider unix.stackexchange.com/q/81302/5132 , for example. Q&As about the histories of the other toolsets would no doubt be welcome.

    – JdeBP
    yesterday







  • 1





    Programs like kill and echo are usually shell builtins, true, but there's of course /bin/ implementations for POSIX compliance, and those will vary by operating system. GNU stuff on Linux, BSD versions in BSDs and Mac OS X. I don't know what AIX or HPUX would use, but probably their own implementations. Good answer, +1

    – Sergiy Kolodyazhnyy
    yesterday


















10















Are these programs in Linux and BSD the same?




The short answer is: Not necessarily.



The source code of common programs such as ls, cat, echo, kill, etc. depend on what userland they come from. In other words, the userland your system uses. The most common userland used with the Linux kernel is GNU - hence the name GNU/Linux. Other userlands have been integrated with the Linux kernel, however.



The BSD's typically have their own userland that is developed separately from others like GNU. Even the BSD's themselves have different code bases. For example, both FreeBSD and OpenBSD have a "BSD userland", but their code base is different. If you look at their man pages (ps for example), they have different arguments that can be used.



One reason POSIX was developed was to address the issue of multiple code bases. If the common utilities delivered with a userland are POSIX compliant, you can assure that they will work (almost) the same whether they come from GNU, FreeBSD, OpenBSD, AIX, or other UNIX based systems.



As you probably know, the userlands listed above (except AIX) are open source. Feel free to poke around their code repositories and you will quickly see that they are not exactly the same.



Note: Even though GNU/Linux is the most popular, there have been attempts to use a GNU userland with FreeBSD/NetBSD kernels in the past. You can read more about them on wikipedia here.






share|improve this answer






























    4














    They have diffent sources, for example: https://github.com/freebsd/freebsd/blob/master/bin/kill/kill.c and https://github.com/karelzak/util-linux/blob/master/misc-utils/kill.c






    share|improve this answer






























      2














      First, I understand Linux as meaning GNU/Linux, which is the operating system, Linux is merely the kernel.



      Now, the source code is NOT the same. The GNU team created the utils, inspired by the UNIX tools that existed, and extended some of these.



      GNU kill and echo are shell built-ins in Bash, the default shell on most GNU systems, so they come with your shell, as in bash.



      ls, and cat are different, separate programs, inspired by UNIX ls and cat, respectively.



      There is a history of UNIX graph that explains where things come from, as you can see, GNU/Linux popped up without any direct ancestry.



      enter image description here



      Of the UNIX flavors, which relate to UNIX time sharing system, these commands all come from that, however, they could have been re-written multiple times.



      You can compare FreeBSD cat source code with GNU cat source code.



      Why do I not refer to GNU/Linux right through ? The waters are murky, you can install the GNU tools on the BSD's as well as on other UNIX systems, well, you can even install them on windows.



      Debian, of Debian GNU/Linux glory, on which Ubuntu and Mint are based (just two examples), offers a GNU distribution with a FreeBSD kernel: GNU/kFreeBSD



      Yes, the graph is outdated ...






      share|improve this answer

























      • I think this is the most comprehensive infographic on major *nixes I've seen thus far. +1 for that

        – Sergiy Kolodyazhnyy
        yesterday






      • 1





        The infographic has several major issues IMHO. IRIX 5.x was based on BSD. Solaris is/was based on SVR5. Linux 0.01 did not contain any Minix code so a parent-child relationship may be stretching the relationship.

        – Doug O'Neal
        18 hours ago


















      0














      In addition to the above correct answers, you will find that the default shell on (almost?) every Linux distro is bash, while the default shell on at least OpenBSD and FreeBSD is not bash. It probably is csh, or ksh, but it is a couple of years since I used any BSD variant, so I am not absolutely sure. Anyway it never had the functionality of bash, even the way in which the previous command can be repeated was confusingly different. The difference in shells may change which of the simpler commands are shell built-ins and which are freestanding programs.



      With several distros now providing the GNU userland with an xBSD kernel, and potentially vice-versa, there is no one absolutely definitive answer to the question. The only absolutely foolproof way of knowing what you have on your system is to use your package manager to download the source and examine it, or examine it on-line if your distro has browseable source, although checking the license which applies would give a fairly good indication.






      share|improve this answer








      New contributor




      tiger99 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.















      • 1





        Enjoy unix.stackexchange.com/q/322035/5132 , unix.stackexchange.com/q/193204/5132 , unix.stackexchange.com/q/496259/5132 , and many others here. And you'll stir up M. Chazelas if you claim that the C shell doesn't have the history expansion that the Bourne Again shell got from the C shell. (-:

        – JdeBP
        yesterday










      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',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      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
      );



      );






      user341875 is a new contributor. Be nice, and check out our Code of Conduct.









      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f506400%2fdo-the-common-programs-for-example-ls-cat-in-linux-and-bsd-come-from-the%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      5 Answers
      5






      active

      oldest

      votes








      5 Answers
      5






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      38














      Linux is a kernel. It does not have the code for applications programs in the first place.



      Linux-based operating systems do not even necessarily use the same source code as one another, let alone the same code as on the BSDs. There are famously multiple implementations of several fairly basic programs.



      These include, but are not limited to:




      • ifconfig had 2 implementations, one in GNU inetutils and the other in NET-3 net-tools. It now has 3, the third being mine. (See https://unix.stackexchange.com/a/504084/5132.)


      • su has 2 implementations, one in util-linux and the other in shadow. Debian switched from one to the other in 2018, making several old questions and answers here on this WWW site wrong. (See https://unix.stackexchange.com/a/460769/5132 and, for one example, "su vs su - (on Debian): why is PATH the same?".)

      • There are seemingly umpteen (actually 4 on Debian/Ubuntu) possible places whence one can obtain the mailx command: GNU Mailutils, BSD mailx, NMH, and s-nail. (See https://unix.stackexchange.com/a/489510/5132.)

      The BSDs are operating systems. They do contain the code for these programs. However, there is no single BSD operating system, and the code for such programs does sometimes vary amongst NetBSD, FreeBSD, OpenBSD, and DragonFly BSD. Moreover, it is definitely different to the code used for the several Linux-based operating systems.



      Famously, Apple/NeXT used BSD applications softwares in MacOS/NeXTSTEP but enhanced several programs to support ACLs in ways different to the ways that the (other) BSDs did. One sets access controls using the chmod command, for example. So the Darwin versions of these commands are different yet again.



      There are three added twists.



      Programs like kill and echo are usually shell builtins. So the code for these commands varies according to what shell you are using, rather than what operating system.



      Then there are BusyBox and ToyBox, available both for Linux-based operating systems and the BSDs and even used as the primary implementations of such commands on a few of the former, which have their own implementations of many commands.



      Then there is OpenSolaris, from which come the likes of Illumos and Schillix, with the Solaris implementations of all of these tools, which is different yet again.



      There are whole histories here, encompassing the original split between BSD and AT&T Unix, through the efforts to "PD" clone many Unix programs in the late 1980s and 1990s, around three decades of shuffling around after that, the whole open-source release of the code for Solaris, and OpenBSD's reimplementations of several things. Even the histories of tools that one might be misled into thinking have one implementation such as cron (which a lot of people erroneously think is the original Unix tool, or erroneously think is at least one single flavour written as "PD cron" by Paul Vixie in 1987, or do not realize has workalike replacements written by other people in the years since) are non-trivial.






      share|improve this answer




















      • 2





        There's even PacBSD which is BSD user on Linux kernel...

        – Mehrdad
        2 days ago











      • BSD was to my knowledged used in Mac OS X/NextStep because the license allowed them to use it with closed source software. NeXTStep included instructions for getting the source for the open source components. The same reasoning may have been used in Linux for providing a GPL userland with a GPL kernel.

        – Thorbjørn Ravn Andersen
        yesterday











      • Good answer, but it would benefit from a little explanation of the origins of the common Linux userlands.

        – Russell Borogove
        yesterday






      • 1





        That's really beyond the scope here, and should be a Q&A in its own right. We even have some such Q&As already. Consider unix.stackexchange.com/q/81302/5132 , for example. Q&As about the histories of the other toolsets would no doubt be welcome.

        – JdeBP
        yesterday







      • 1





        Programs like kill and echo are usually shell builtins, true, but there's of course /bin/ implementations for POSIX compliance, and those will vary by operating system. GNU stuff on Linux, BSD versions in BSDs and Mac OS X. I don't know what AIX or HPUX would use, but probably their own implementations. Good answer, +1

        – Sergiy Kolodyazhnyy
        yesterday















      38














      Linux is a kernel. It does not have the code for applications programs in the first place.



      Linux-based operating systems do not even necessarily use the same source code as one another, let alone the same code as on the BSDs. There are famously multiple implementations of several fairly basic programs.



      These include, but are not limited to:




      • ifconfig had 2 implementations, one in GNU inetutils and the other in NET-3 net-tools. It now has 3, the third being mine. (See https://unix.stackexchange.com/a/504084/5132.)


      • su has 2 implementations, one in util-linux and the other in shadow. Debian switched from one to the other in 2018, making several old questions and answers here on this WWW site wrong. (See https://unix.stackexchange.com/a/460769/5132 and, for one example, "su vs su - (on Debian): why is PATH the same?".)

      • There are seemingly umpteen (actually 4 on Debian/Ubuntu) possible places whence one can obtain the mailx command: GNU Mailutils, BSD mailx, NMH, and s-nail. (See https://unix.stackexchange.com/a/489510/5132.)

      The BSDs are operating systems. They do contain the code for these programs. However, there is no single BSD operating system, and the code for such programs does sometimes vary amongst NetBSD, FreeBSD, OpenBSD, and DragonFly BSD. Moreover, it is definitely different to the code used for the several Linux-based operating systems.



      Famously, Apple/NeXT used BSD applications softwares in MacOS/NeXTSTEP but enhanced several programs to support ACLs in ways different to the ways that the (other) BSDs did. One sets access controls using the chmod command, for example. So the Darwin versions of these commands are different yet again.



      There are three added twists.



      Programs like kill and echo are usually shell builtins. So the code for these commands varies according to what shell you are using, rather than what operating system.



      Then there are BusyBox and ToyBox, available both for Linux-based operating systems and the BSDs and even used as the primary implementations of such commands on a few of the former, which have their own implementations of many commands.



      Then there is OpenSolaris, from which come the likes of Illumos and Schillix, with the Solaris implementations of all of these tools, which is different yet again.



      There are whole histories here, encompassing the original split between BSD and AT&T Unix, through the efforts to "PD" clone many Unix programs in the late 1980s and 1990s, around three decades of shuffling around after that, the whole open-source release of the code for Solaris, and OpenBSD's reimplementations of several things. Even the histories of tools that one might be misled into thinking have one implementation such as cron (which a lot of people erroneously think is the original Unix tool, or erroneously think is at least one single flavour written as "PD cron" by Paul Vixie in 1987, or do not realize has workalike replacements written by other people in the years since) are non-trivial.






      share|improve this answer




















      • 2





        There's even PacBSD which is BSD user on Linux kernel...

        – Mehrdad
        2 days ago











      • BSD was to my knowledged used in Mac OS X/NextStep because the license allowed them to use it with closed source software. NeXTStep included instructions for getting the source for the open source components. The same reasoning may have been used in Linux for providing a GPL userland with a GPL kernel.

        – Thorbjørn Ravn Andersen
        yesterday











      • Good answer, but it would benefit from a little explanation of the origins of the common Linux userlands.

        – Russell Borogove
        yesterday






      • 1





        That's really beyond the scope here, and should be a Q&A in its own right. We even have some such Q&As already. Consider unix.stackexchange.com/q/81302/5132 , for example. Q&As about the histories of the other toolsets would no doubt be welcome.

        – JdeBP
        yesterday







      • 1





        Programs like kill and echo are usually shell builtins, true, but there's of course /bin/ implementations for POSIX compliance, and those will vary by operating system. GNU stuff on Linux, BSD versions in BSDs and Mac OS X. I don't know what AIX or HPUX would use, but probably their own implementations. Good answer, +1

        – Sergiy Kolodyazhnyy
        yesterday













      38












      38








      38







      Linux is a kernel. It does not have the code for applications programs in the first place.



      Linux-based operating systems do not even necessarily use the same source code as one another, let alone the same code as on the BSDs. There are famously multiple implementations of several fairly basic programs.



      These include, but are not limited to:




      • ifconfig had 2 implementations, one in GNU inetutils and the other in NET-3 net-tools. It now has 3, the third being mine. (See https://unix.stackexchange.com/a/504084/5132.)


      • su has 2 implementations, one in util-linux and the other in shadow. Debian switched from one to the other in 2018, making several old questions and answers here on this WWW site wrong. (See https://unix.stackexchange.com/a/460769/5132 and, for one example, "su vs su - (on Debian): why is PATH the same?".)

      • There are seemingly umpteen (actually 4 on Debian/Ubuntu) possible places whence one can obtain the mailx command: GNU Mailutils, BSD mailx, NMH, and s-nail. (See https://unix.stackexchange.com/a/489510/5132.)

      The BSDs are operating systems. They do contain the code for these programs. However, there is no single BSD operating system, and the code for such programs does sometimes vary amongst NetBSD, FreeBSD, OpenBSD, and DragonFly BSD. Moreover, it is definitely different to the code used for the several Linux-based operating systems.



      Famously, Apple/NeXT used BSD applications softwares in MacOS/NeXTSTEP but enhanced several programs to support ACLs in ways different to the ways that the (other) BSDs did. One sets access controls using the chmod command, for example. So the Darwin versions of these commands are different yet again.



      There are three added twists.



      Programs like kill and echo are usually shell builtins. So the code for these commands varies according to what shell you are using, rather than what operating system.



      Then there are BusyBox and ToyBox, available both for Linux-based operating systems and the BSDs and even used as the primary implementations of such commands on a few of the former, which have their own implementations of many commands.



      Then there is OpenSolaris, from which come the likes of Illumos and Schillix, with the Solaris implementations of all of these tools, which is different yet again.



      There are whole histories here, encompassing the original split between BSD and AT&T Unix, through the efforts to "PD" clone many Unix programs in the late 1980s and 1990s, around three decades of shuffling around after that, the whole open-source release of the code for Solaris, and OpenBSD's reimplementations of several things. Even the histories of tools that one might be misled into thinking have one implementation such as cron (which a lot of people erroneously think is the original Unix tool, or erroneously think is at least one single flavour written as "PD cron" by Paul Vixie in 1987, or do not realize has workalike replacements written by other people in the years since) are non-trivial.






      share|improve this answer















      Linux is a kernel. It does not have the code for applications programs in the first place.



      Linux-based operating systems do not even necessarily use the same source code as one another, let alone the same code as on the BSDs. There are famously multiple implementations of several fairly basic programs.



      These include, but are not limited to:




      • ifconfig had 2 implementations, one in GNU inetutils and the other in NET-3 net-tools. It now has 3, the third being mine. (See https://unix.stackexchange.com/a/504084/5132.)


      • su has 2 implementations, one in util-linux and the other in shadow. Debian switched from one to the other in 2018, making several old questions and answers here on this WWW site wrong. (See https://unix.stackexchange.com/a/460769/5132 and, for one example, "su vs su - (on Debian): why is PATH the same?".)

      • There are seemingly umpteen (actually 4 on Debian/Ubuntu) possible places whence one can obtain the mailx command: GNU Mailutils, BSD mailx, NMH, and s-nail. (See https://unix.stackexchange.com/a/489510/5132.)

      The BSDs are operating systems. They do contain the code for these programs. However, there is no single BSD operating system, and the code for such programs does sometimes vary amongst NetBSD, FreeBSD, OpenBSD, and DragonFly BSD. Moreover, it is definitely different to the code used for the several Linux-based operating systems.



      Famously, Apple/NeXT used BSD applications softwares in MacOS/NeXTSTEP but enhanced several programs to support ACLs in ways different to the ways that the (other) BSDs did. One sets access controls using the chmod command, for example. So the Darwin versions of these commands are different yet again.



      There are three added twists.



      Programs like kill and echo are usually shell builtins. So the code for these commands varies according to what shell you are using, rather than what operating system.



      Then there are BusyBox and ToyBox, available both for Linux-based operating systems and the BSDs and even used as the primary implementations of such commands on a few of the former, which have their own implementations of many commands.



      Then there is OpenSolaris, from which come the likes of Illumos and Schillix, with the Solaris implementations of all of these tools, which is different yet again.



      There are whole histories here, encompassing the original split between BSD and AT&T Unix, through the efforts to "PD" clone many Unix programs in the late 1980s and 1990s, around three decades of shuffling around after that, the whole open-source release of the code for Solaris, and OpenBSD's reimplementations of several things. Even the histories of tools that one might be misled into thinking have one implementation such as cron (which a lot of people erroneously think is the original Unix tool, or erroneously think is at least one single flavour written as "PD cron" by Paul Vixie in 1987, or do not realize has workalike replacements written by other people in the years since) are non-trivial.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited yesterday

























      answered 2 days ago









      JdeBPJdeBP

      37k475176




      37k475176







      • 2





        There's even PacBSD which is BSD user on Linux kernel...

        – Mehrdad
        2 days ago











      • BSD was to my knowledged used in Mac OS X/NextStep because the license allowed them to use it with closed source software. NeXTStep included instructions for getting the source for the open source components. The same reasoning may have been used in Linux for providing a GPL userland with a GPL kernel.

        – Thorbjørn Ravn Andersen
        yesterday











      • Good answer, but it would benefit from a little explanation of the origins of the common Linux userlands.

        – Russell Borogove
        yesterday






      • 1





        That's really beyond the scope here, and should be a Q&A in its own right. We even have some such Q&As already. Consider unix.stackexchange.com/q/81302/5132 , for example. Q&As about the histories of the other toolsets would no doubt be welcome.

        – JdeBP
        yesterday







      • 1





        Programs like kill and echo are usually shell builtins, true, but there's of course /bin/ implementations for POSIX compliance, and those will vary by operating system. GNU stuff on Linux, BSD versions in BSDs and Mac OS X. I don't know what AIX or HPUX would use, but probably their own implementations. Good answer, +1

        – Sergiy Kolodyazhnyy
        yesterday












      • 2





        There's even PacBSD which is BSD user on Linux kernel...

        – Mehrdad
        2 days ago











      • BSD was to my knowledged used in Mac OS X/NextStep because the license allowed them to use it with closed source software. NeXTStep included instructions for getting the source for the open source components. The same reasoning may have been used in Linux for providing a GPL userland with a GPL kernel.

        – Thorbjørn Ravn Andersen
        yesterday











      • Good answer, but it would benefit from a little explanation of the origins of the common Linux userlands.

        – Russell Borogove
        yesterday






      • 1





        That's really beyond the scope here, and should be a Q&A in its own right. We even have some such Q&As already. Consider unix.stackexchange.com/q/81302/5132 , for example. Q&As about the histories of the other toolsets would no doubt be welcome.

        – JdeBP
        yesterday







      • 1





        Programs like kill and echo are usually shell builtins, true, but there's of course /bin/ implementations for POSIX compliance, and those will vary by operating system. GNU stuff on Linux, BSD versions in BSDs and Mac OS X. I don't know what AIX or HPUX would use, but probably their own implementations. Good answer, +1

        – Sergiy Kolodyazhnyy
        yesterday







      2




      2





      There's even PacBSD which is BSD user on Linux kernel...

      – Mehrdad
      2 days ago





      There's even PacBSD which is BSD user on Linux kernel...

      – Mehrdad
      2 days ago













      BSD was to my knowledged used in Mac OS X/NextStep because the license allowed them to use it with closed source software. NeXTStep included instructions for getting the source for the open source components. The same reasoning may have been used in Linux for providing a GPL userland with a GPL kernel.

      – Thorbjørn Ravn Andersen
      yesterday





      BSD was to my knowledged used in Mac OS X/NextStep because the license allowed them to use it with closed source software. NeXTStep included instructions for getting the source for the open source components. The same reasoning may have been used in Linux for providing a GPL userland with a GPL kernel.

      – Thorbjørn Ravn Andersen
      yesterday













      Good answer, but it would benefit from a little explanation of the origins of the common Linux userlands.

      – Russell Borogove
      yesterday





      Good answer, but it would benefit from a little explanation of the origins of the common Linux userlands.

      – Russell Borogove
      yesterday




      1




      1





      That's really beyond the scope here, and should be a Q&A in its own right. We even have some such Q&As already. Consider unix.stackexchange.com/q/81302/5132 , for example. Q&As about the histories of the other toolsets would no doubt be welcome.

      – JdeBP
      yesterday






      That's really beyond the scope here, and should be a Q&A in its own right. We even have some such Q&As already. Consider unix.stackexchange.com/q/81302/5132 , for example. Q&As about the histories of the other toolsets would no doubt be welcome.

      – JdeBP
      yesterday





      1




      1





      Programs like kill and echo are usually shell builtins, true, but there's of course /bin/ implementations for POSIX compliance, and those will vary by operating system. GNU stuff on Linux, BSD versions in BSDs and Mac OS X. I don't know what AIX or HPUX would use, but probably their own implementations. Good answer, +1

      – Sergiy Kolodyazhnyy
      yesterday





      Programs like kill and echo are usually shell builtins, true, but there's of course /bin/ implementations for POSIX compliance, and those will vary by operating system. GNU stuff on Linux, BSD versions in BSDs and Mac OS X. I don't know what AIX or HPUX would use, but probably their own implementations. Good answer, +1

      – Sergiy Kolodyazhnyy
      yesterday













      10















      Are these programs in Linux and BSD the same?




      The short answer is: Not necessarily.



      The source code of common programs such as ls, cat, echo, kill, etc. depend on what userland they come from. In other words, the userland your system uses. The most common userland used with the Linux kernel is GNU - hence the name GNU/Linux. Other userlands have been integrated with the Linux kernel, however.



      The BSD's typically have their own userland that is developed separately from others like GNU. Even the BSD's themselves have different code bases. For example, both FreeBSD and OpenBSD have a "BSD userland", but their code base is different. If you look at their man pages (ps for example), they have different arguments that can be used.



      One reason POSIX was developed was to address the issue of multiple code bases. If the common utilities delivered with a userland are POSIX compliant, you can assure that they will work (almost) the same whether they come from GNU, FreeBSD, OpenBSD, AIX, or other UNIX based systems.



      As you probably know, the userlands listed above (except AIX) are open source. Feel free to poke around their code repositories and you will quickly see that they are not exactly the same.



      Note: Even though GNU/Linux is the most popular, there have been attempts to use a GNU userland with FreeBSD/NetBSD kernels in the past. You can read more about them on wikipedia here.






      share|improve this answer



























        10















        Are these programs in Linux and BSD the same?




        The short answer is: Not necessarily.



        The source code of common programs such as ls, cat, echo, kill, etc. depend on what userland they come from. In other words, the userland your system uses. The most common userland used with the Linux kernel is GNU - hence the name GNU/Linux. Other userlands have been integrated with the Linux kernel, however.



        The BSD's typically have their own userland that is developed separately from others like GNU. Even the BSD's themselves have different code bases. For example, both FreeBSD and OpenBSD have a "BSD userland", but their code base is different. If you look at their man pages (ps for example), they have different arguments that can be used.



        One reason POSIX was developed was to address the issue of multiple code bases. If the common utilities delivered with a userland are POSIX compliant, you can assure that they will work (almost) the same whether they come from GNU, FreeBSD, OpenBSD, AIX, or other UNIX based systems.



        As you probably know, the userlands listed above (except AIX) are open source. Feel free to poke around their code repositories and you will quickly see that they are not exactly the same.



        Note: Even though GNU/Linux is the most popular, there have been attempts to use a GNU userland with FreeBSD/NetBSD kernels in the past. You can read more about them on wikipedia here.






        share|improve this answer

























          10












          10








          10








          Are these programs in Linux and BSD the same?




          The short answer is: Not necessarily.



          The source code of common programs such as ls, cat, echo, kill, etc. depend on what userland they come from. In other words, the userland your system uses. The most common userland used with the Linux kernel is GNU - hence the name GNU/Linux. Other userlands have been integrated with the Linux kernel, however.



          The BSD's typically have their own userland that is developed separately from others like GNU. Even the BSD's themselves have different code bases. For example, both FreeBSD and OpenBSD have a "BSD userland", but their code base is different. If you look at their man pages (ps for example), they have different arguments that can be used.



          One reason POSIX was developed was to address the issue of multiple code bases. If the common utilities delivered with a userland are POSIX compliant, you can assure that they will work (almost) the same whether they come from GNU, FreeBSD, OpenBSD, AIX, or other UNIX based systems.



          As you probably know, the userlands listed above (except AIX) are open source. Feel free to poke around their code repositories and you will quickly see that they are not exactly the same.



          Note: Even though GNU/Linux is the most popular, there have been attempts to use a GNU userland with FreeBSD/NetBSD kernels in the past. You can read more about them on wikipedia here.






          share|improve this answer














          Are these programs in Linux and BSD the same?




          The short answer is: Not necessarily.



          The source code of common programs such as ls, cat, echo, kill, etc. depend on what userland they come from. In other words, the userland your system uses. The most common userland used with the Linux kernel is GNU - hence the name GNU/Linux. Other userlands have been integrated with the Linux kernel, however.



          The BSD's typically have their own userland that is developed separately from others like GNU. Even the BSD's themselves have different code bases. For example, both FreeBSD and OpenBSD have a "BSD userland", but their code base is different. If you look at their man pages (ps for example), they have different arguments that can be used.



          One reason POSIX was developed was to address the issue of multiple code bases. If the common utilities delivered with a userland are POSIX compliant, you can assure that they will work (almost) the same whether they come from GNU, FreeBSD, OpenBSD, AIX, or other UNIX based systems.



          As you probably know, the userlands listed above (except AIX) are open source. Feel free to poke around their code repositories and you will quickly see that they are not exactly the same.



          Note: Even though GNU/Linux is the most popular, there have been attempts to use a GNU userland with FreeBSD/NetBSD kernels in the past. You can read more about them on wikipedia here.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 days ago









          PeschkePeschke

          2,726926




          2,726926





















              4














              They have diffent sources, for example: https://github.com/freebsd/freebsd/blob/master/bin/kill/kill.c and https://github.com/karelzak/util-linux/blob/master/misc-utils/kill.c






              share|improve this answer



























                4














                They have diffent sources, for example: https://github.com/freebsd/freebsd/blob/master/bin/kill/kill.c and https://github.com/karelzak/util-linux/blob/master/misc-utils/kill.c






                share|improve this answer

























                  4












                  4








                  4







                  They have diffent sources, for example: https://github.com/freebsd/freebsd/blob/master/bin/kill/kill.c and https://github.com/karelzak/util-linux/blob/master/misc-utils/kill.c






                  share|improve this answer













                  They have diffent sources, for example: https://github.com/freebsd/freebsd/blob/master/bin/kill/kill.c and https://github.com/karelzak/util-linux/blob/master/misc-utils/kill.c







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 2 days ago









                  Fedor DikarevFedor Dikarev

                  1,063310




                  1,063310





















                      2














                      First, I understand Linux as meaning GNU/Linux, which is the operating system, Linux is merely the kernel.



                      Now, the source code is NOT the same. The GNU team created the utils, inspired by the UNIX tools that existed, and extended some of these.



                      GNU kill and echo are shell built-ins in Bash, the default shell on most GNU systems, so they come with your shell, as in bash.



                      ls, and cat are different, separate programs, inspired by UNIX ls and cat, respectively.



                      There is a history of UNIX graph that explains where things come from, as you can see, GNU/Linux popped up without any direct ancestry.



                      enter image description here



                      Of the UNIX flavors, which relate to UNIX time sharing system, these commands all come from that, however, they could have been re-written multiple times.



                      You can compare FreeBSD cat source code with GNU cat source code.



                      Why do I not refer to GNU/Linux right through ? The waters are murky, you can install the GNU tools on the BSD's as well as on other UNIX systems, well, you can even install them on windows.



                      Debian, of Debian GNU/Linux glory, on which Ubuntu and Mint are based (just two examples), offers a GNU distribution with a FreeBSD kernel: GNU/kFreeBSD



                      Yes, the graph is outdated ...






                      share|improve this answer

























                      • I think this is the most comprehensive infographic on major *nixes I've seen thus far. +1 for that

                        – Sergiy Kolodyazhnyy
                        yesterday






                      • 1





                        The infographic has several major issues IMHO. IRIX 5.x was based on BSD. Solaris is/was based on SVR5. Linux 0.01 did not contain any Minix code so a parent-child relationship may be stretching the relationship.

                        – Doug O'Neal
                        18 hours ago















                      2














                      First, I understand Linux as meaning GNU/Linux, which is the operating system, Linux is merely the kernel.



                      Now, the source code is NOT the same. The GNU team created the utils, inspired by the UNIX tools that existed, and extended some of these.



                      GNU kill and echo are shell built-ins in Bash, the default shell on most GNU systems, so they come with your shell, as in bash.



                      ls, and cat are different, separate programs, inspired by UNIX ls and cat, respectively.



                      There is a history of UNIX graph that explains where things come from, as you can see, GNU/Linux popped up without any direct ancestry.



                      enter image description here



                      Of the UNIX flavors, which relate to UNIX time sharing system, these commands all come from that, however, they could have been re-written multiple times.



                      You can compare FreeBSD cat source code with GNU cat source code.



                      Why do I not refer to GNU/Linux right through ? The waters are murky, you can install the GNU tools on the BSD's as well as on other UNIX systems, well, you can even install them on windows.



                      Debian, of Debian GNU/Linux glory, on which Ubuntu and Mint are based (just two examples), offers a GNU distribution with a FreeBSD kernel: GNU/kFreeBSD



                      Yes, the graph is outdated ...






                      share|improve this answer

























                      • I think this is the most comprehensive infographic on major *nixes I've seen thus far. +1 for that

                        – Sergiy Kolodyazhnyy
                        yesterday






                      • 1





                        The infographic has several major issues IMHO. IRIX 5.x was based on BSD. Solaris is/was based on SVR5. Linux 0.01 did not contain any Minix code so a parent-child relationship may be stretching the relationship.

                        – Doug O'Neal
                        18 hours ago













                      2












                      2








                      2







                      First, I understand Linux as meaning GNU/Linux, which is the operating system, Linux is merely the kernel.



                      Now, the source code is NOT the same. The GNU team created the utils, inspired by the UNIX tools that existed, and extended some of these.



                      GNU kill and echo are shell built-ins in Bash, the default shell on most GNU systems, so they come with your shell, as in bash.



                      ls, and cat are different, separate programs, inspired by UNIX ls and cat, respectively.



                      There is a history of UNIX graph that explains where things come from, as you can see, GNU/Linux popped up without any direct ancestry.



                      enter image description here



                      Of the UNIX flavors, which relate to UNIX time sharing system, these commands all come from that, however, they could have been re-written multiple times.



                      You can compare FreeBSD cat source code with GNU cat source code.



                      Why do I not refer to GNU/Linux right through ? The waters are murky, you can install the GNU tools on the BSD's as well as on other UNIX systems, well, you can even install them on windows.



                      Debian, of Debian GNU/Linux glory, on which Ubuntu and Mint are based (just two examples), offers a GNU distribution with a FreeBSD kernel: GNU/kFreeBSD



                      Yes, the graph is outdated ...






                      share|improve this answer















                      First, I understand Linux as meaning GNU/Linux, which is the operating system, Linux is merely the kernel.



                      Now, the source code is NOT the same. The GNU team created the utils, inspired by the UNIX tools that existed, and extended some of these.



                      GNU kill and echo are shell built-ins in Bash, the default shell on most GNU systems, so they come with your shell, as in bash.



                      ls, and cat are different, separate programs, inspired by UNIX ls and cat, respectively.



                      There is a history of UNIX graph that explains where things come from, as you can see, GNU/Linux popped up without any direct ancestry.



                      enter image description here



                      Of the UNIX flavors, which relate to UNIX time sharing system, these commands all come from that, however, they could have been re-written multiple times.



                      You can compare FreeBSD cat source code with GNU cat source code.



                      Why do I not refer to GNU/Linux right through ? The waters are murky, you can install the GNU tools on the BSD's as well as on other UNIX systems, well, you can even install them on windows.



                      Debian, of Debian GNU/Linux glory, on which Ubuntu and Mint are based (just two examples), offers a GNU distribution with a FreeBSD kernel: GNU/kFreeBSD



                      Yes, the graph is outdated ...







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited 2 days ago

























                      answered 2 days ago









                      thecarpythecarpy

                      2,390825




                      2,390825












                      • I think this is the most comprehensive infographic on major *nixes I've seen thus far. +1 for that

                        – Sergiy Kolodyazhnyy
                        yesterday






                      • 1





                        The infographic has several major issues IMHO. IRIX 5.x was based on BSD. Solaris is/was based on SVR5. Linux 0.01 did not contain any Minix code so a parent-child relationship may be stretching the relationship.

                        – Doug O'Neal
                        18 hours ago

















                      • I think this is the most comprehensive infographic on major *nixes I've seen thus far. +1 for that

                        – Sergiy Kolodyazhnyy
                        yesterday






                      • 1





                        The infographic has several major issues IMHO. IRIX 5.x was based on BSD. Solaris is/was based on SVR5. Linux 0.01 did not contain any Minix code so a parent-child relationship may be stretching the relationship.

                        – Doug O'Neal
                        18 hours ago
















                      I think this is the most comprehensive infographic on major *nixes I've seen thus far. +1 for that

                      – Sergiy Kolodyazhnyy
                      yesterday





                      I think this is the most comprehensive infographic on major *nixes I've seen thus far. +1 for that

                      – Sergiy Kolodyazhnyy
                      yesterday




                      1




                      1





                      The infographic has several major issues IMHO. IRIX 5.x was based on BSD. Solaris is/was based on SVR5. Linux 0.01 did not contain any Minix code so a parent-child relationship may be stretching the relationship.

                      – Doug O'Neal
                      18 hours ago





                      The infographic has several major issues IMHO. IRIX 5.x was based on BSD. Solaris is/was based on SVR5. Linux 0.01 did not contain any Minix code so a parent-child relationship may be stretching the relationship.

                      – Doug O'Neal
                      18 hours ago











                      0














                      In addition to the above correct answers, you will find that the default shell on (almost?) every Linux distro is bash, while the default shell on at least OpenBSD and FreeBSD is not bash. It probably is csh, or ksh, but it is a couple of years since I used any BSD variant, so I am not absolutely sure. Anyway it never had the functionality of bash, even the way in which the previous command can be repeated was confusingly different. The difference in shells may change which of the simpler commands are shell built-ins and which are freestanding programs.



                      With several distros now providing the GNU userland with an xBSD kernel, and potentially vice-versa, there is no one absolutely definitive answer to the question. The only absolutely foolproof way of knowing what you have on your system is to use your package manager to download the source and examine it, or examine it on-line if your distro has browseable source, although checking the license which applies would give a fairly good indication.






                      share|improve this answer








                      New contributor




                      tiger99 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.















                      • 1





                        Enjoy unix.stackexchange.com/q/322035/5132 , unix.stackexchange.com/q/193204/5132 , unix.stackexchange.com/q/496259/5132 , and many others here. And you'll stir up M. Chazelas if you claim that the C shell doesn't have the history expansion that the Bourne Again shell got from the C shell. (-:

                        – JdeBP
                        yesterday















                      0














                      In addition to the above correct answers, you will find that the default shell on (almost?) every Linux distro is bash, while the default shell on at least OpenBSD and FreeBSD is not bash. It probably is csh, or ksh, but it is a couple of years since I used any BSD variant, so I am not absolutely sure. Anyway it never had the functionality of bash, even the way in which the previous command can be repeated was confusingly different. The difference in shells may change which of the simpler commands are shell built-ins and which are freestanding programs.



                      With several distros now providing the GNU userland with an xBSD kernel, and potentially vice-versa, there is no one absolutely definitive answer to the question. The only absolutely foolproof way of knowing what you have on your system is to use your package manager to download the source and examine it, or examine it on-line if your distro has browseable source, although checking the license which applies would give a fairly good indication.






                      share|improve this answer








                      New contributor




                      tiger99 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.















                      • 1





                        Enjoy unix.stackexchange.com/q/322035/5132 , unix.stackexchange.com/q/193204/5132 , unix.stackexchange.com/q/496259/5132 , and many others here. And you'll stir up M. Chazelas if you claim that the C shell doesn't have the history expansion that the Bourne Again shell got from the C shell. (-:

                        – JdeBP
                        yesterday













                      0












                      0








                      0







                      In addition to the above correct answers, you will find that the default shell on (almost?) every Linux distro is bash, while the default shell on at least OpenBSD and FreeBSD is not bash. It probably is csh, or ksh, but it is a couple of years since I used any BSD variant, so I am not absolutely sure. Anyway it never had the functionality of bash, even the way in which the previous command can be repeated was confusingly different. The difference in shells may change which of the simpler commands are shell built-ins and which are freestanding programs.



                      With several distros now providing the GNU userland with an xBSD kernel, and potentially vice-versa, there is no one absolutely definitive answer to the question. The only absolutely foolproof way of knowing what you have on your system is to use your package manager to download the source and examine it, or examine it on-line if your distro has browseable source, although checking the license which applies would give a fairly good indication.






                      share|improve this answer








                      New contributor




                      tiger99 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.










                      In addition to the above correct answers, you will find that the default shell on (almost?) every Linux distro is bash, while the default shell on at least OpenBSD and FreeBSD is not bash. It probably is csh, or ksh, but it is a couple of years since I used any BSD variant, so I am not absolutely sure. Anyway it never had the functionality of bash, even the way in which the previous command can be repeated was confusingly different. The difference in shells may change which of the simpler commands are shell built-ins and which are freestanding programs.



                      With several distros now providing the GNU userland with an xBSD kernel, and potentially vice-versa, there is no one absolutely definitive answer to the question. The only absolutely foolproof way of knowing what you have on your system is to use your package manager to download the source and examine it, or examine it on-line if your distro has browseable source, although checking the license which applies would give a fairly good indication.







                      share|improve this answer








                      New contributor




                      tiger99 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.









                      share|improve this answer



                      share|improve this answer






                      New contributor




                      tiger99 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.









                      answered yesterday









                      tiger99tiger99

                      1




                      1




                      New contributor




                      tiger99 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.





                      New contributor





                      tiger99 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






                      tiger99 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.







                      • 1





                        Enjoy unix.stackexchange.com/q/322035/5132 , unix.stackexchange.com/q/193204/5132 , unix.stackexchange.com/q/496259/5132 , and many others here. And you'll stir up M. Chazelas if you claim that the C shell doesn't have the history expansion that the Bourne Again shell got from the C shell. (-:

                        – JdeBP
                        yesterday












                      • 1





                        Enjoy unix.stackexchange.com/q/322035/5132 , unix.stackexchange.com/q/193204/5132 , unix.stackexchange.com/q/496259/5132 , and many others here. And you'll stir up M. Chazelas if you claim that the C shell doesn't have the history expansion that the Bourne Again shell got from the C shell. (-:

                        – JdeBP
                        yesterday







                      1




                      1





                      Enjoy unix.stackexchange.com/q/322035/5132 , unix.stackexchange.com/q/193204/5132 , unix.stackexchange.com/q/496259/5132 , and many others here. And you'll stir up M. Chazelas if you claim that the C shell doesn't have the history expansion that the Bourne Again shell got from the C shell. (-:

                      – JdeBP
                      yesterday





                      Enjoy unix.stackexchange.com/q/322035/5132 , unix.stackexchange.com/q/193204/5132 , unix.stackexchange.com/q/496259/5132 , and many others here. And you'll stir up M. Chazelas if you claim that the C shell doesn't have the history expansion that the Bourne Again shell got from the C shell. (-:

                      – JdeBP
                      yesterday










                      user341875 is a new contributor. Be nice, and check out our Code of Conduct.









                      draft saved

                      draft discarded


















                      user341875 is a new contributor. Be nice, and check out our Code of Conduct.












                      user341875 is a new contributor. Be nice, and check out our Code of Conduct.











                      user341875 is a new contributor. Be nice, and check out our Code of Conduct.














                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • 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%2funix.stackexchange.com%2fquestions%2f506400%2fdo-the-common-programs-for-example-ls-cat-in-linux-and-bsd-come-from-the%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

                      Bruad Bilen | Luke uk diar | NawigatsjuunCommonskategorii: BruadCommonskategorii: RunstükenWikiquote: Bruad

                      What is the offset in a seaplane's hull?

                      Slayer Innehåll Historia | Stil, komposition och lyrik | Bandets betydelse och framgångar | Sidoprojekt och samarbeten | Kontroverser | Medlemmar | Utmärkelser och nomineringar | Turnéer och festivaler | Diskografi | Referenser | Externa länkar | Navigeringsmenywww.slayer.net”Metal Massacre vol. 1””Metal Massacre vol. 3””Metal Massacre Volume III””Show No Mercy””Haunting the Chapel””Live Undead””Hell Awaits””Reign in Blood””Reign in Blood””Gold & Platinum – Reign in Blood””Golden Gods Awards Winners”originalet”Kerrang! Hall Of Fame””Slayer Looks Back On 37-Year Career In New Video Series: Part Two””South of Heaven””Gold & Platinum – South of Heaven””Seasons in the Abyss””Gold & Platinum - Seasons in the Abyss””Divine Intervention””Divine Intervention - Release group by Slayer””Gold & Platinum - Divine Intervention””Live Intrusion””Undisputed Attitude””Abolish Government/Superficial Love””Release “Slatanic Slaughter: A Tribute to Slayer” by Various Artists””Diabolus in Musica””Soundtrack to the Apocalypse””God Hates Us All””Systematic - Relationships””War at the Warfield””Gold & Platinum - War at the Warfield””Soundtrack to the Apocalypse””Gold & Platinum - Still Reigning””Metallica, Slayer, Iron Mauden Among Winners At Metal Hammer Awards””Eternal Pyre””Eternal Pyre - Slayer release group””Eternal Pyre””Metal Storm Awards 2006””Kerrang! Hall Of Fame””Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Bullet-For My Valentine booed at Metal Hammer Golden Gods Awards””Unholy Aliance””The End Of Slayer?””Slayer: We Could Thrash Out Two More Albums If We're Fast Enough...””'The Unholy Alliance: Chapter III' UK Dates Added”originalet”Megadeth And Slayer To Co-Headline 'Canadian Carnage' Trek”originalet”World Painted Blood””Release “World Painted Blood” by Slayer””Metallica Heading To Cinemas””Slayer, Megadeth To Join Forces For 'European Carnage' Tour - Dec. 18, 2010”originalet”Slayer's Hanneman Contracts Acute Infection; Band To Bring In Guest Guitarist””Cannibal Corpse's Pat O'Brien Will Step In As Slayer's Guest Guitarist”originalet”Slayer’s Jeff Hanneman Dead at 49””Dave Lombardo Says He Made Only $67,000 In 2011 While Touring With Slayer””Slayer: We Do Not Agree With Dave Lombardo's Substance Or Timeline Of Events””Slayer Welcomes Drummer Paul Bostaph Back To The Fold””Slayer Hope to Unveil Never-Before-Heard Jeff Hanneman Material on Next Album””Slayer Debut New Song 'Implode' During Surprise Golden Gods Appearance””Release group Repentless by Slayer””Repentless - Slayer - Credits””Slayer””Metal Storm Awards 2015””Slayer - to release comic book "Repentless #1"””Slayer To Release 'Repentless' 6.66" Vinyl Box Set””BREAKING NEWS: Slayer Announce Farewell Tour””Slayer Recruit Lamb of God, Anthrax, Behemoth + Testament for Final Tour””Slayer lägger ner efter 37 år””Slayer Announces Second North American Leg Of 'Final' Tour””Final World Tour””Slayer Announces Final European Tour With Lamb of God, Anthrax And Obituary””Slayer To Tour Europe With Lamb of God, Anthrax And Obituary””Slayer To Play 'Last French Show Ever' At Next Year's Hellfst””Slayer's Final World Tour Will Extend Into 2019””Death Angel's Rob Cavestany On Slayer's 'Farewell' Tour: 'Some Of Us Could See This Coming'””Testament Has No Plans To Retire Anytime Soon, Says Chuck Billy””Anthrax's Scott Ian On Slayer's 'Farewell' Tour Plans: 'I Was Surprised And I Wasn't Surprised'””Slayer””Slayer's Morbid Schlock””Review/Rock; For Slayer, the Mania Is the Message””Slayer - Biography””Slayer - Reign In Blood”originalet”Dave Lombardo””An exclusive oral history of Slayer”originalet”Exclusive! Interview With Slayer Guitarist Jeff Hanneman”originalet”Thinking Out Loud: Slayer's Kerry King on hair metal, Satan and being polite””Slayer Lyrics””Slayer - Biography””Most influential artists for extreme metal music””Slayer - Reign in Blood””Slayer guitarist Jeff Hanneman dies aged 49””Slatanic Slaughter: A Tribute to Slayer””Gateway to Hell: A Tribute to Slayer””Covered In Blood””Slayer: The Origins of Thrash in San Francisco, CA.””Why They Rule - #6 Slayer”originalet”Guitar World's 100 Greatest Heavy Metal Guitarists Of All Time”originalet”The fans have spoken: Slayer comes out on top in readers' polls”originalet”Tribute to Jeff Hanneman (1964-2013)””Lamb Of God Frontman: We Sound Like A Slayer Rip-Off””BEHEMOTH Frontman Pays Tribute To SLAYER's JEFF HANNEMAN””Slayer, Hatebreed Doing Double Duty On This Year's Ozzfest””System of a Down””Lacuna Coil’s Andrea Ferro Talks Influences, Skateboarding, Band Origins + More””Slayer - Reign in Blood””Into The Lungs of Hell””Slayer rules - en utställning om fans””Slayer and Their Fans Slashed Through a No-Holds-Barred Night at Gas Monkey””Home””Slayer””Gold & Platinum - The Big 4 Live from Sofia, Bulgaria””Exclusive! Interview With Slayer Guitarist Kerry King””2008-02-23: Wiltern, Los Angeles, CA, USA””Slayer's Kerry King To Perform With Megadeth Tonight! - Oct. 21, 2010”originalet”Dave Lombardo - Biography”Slayer Case DismissedArkiveradUltimate Classic Rock: Slayer guitarist Jeff Hanneman dead at 49.”Slayer: "We could never do any thing like Some Kind Of Monster..."””Cannibal Corpse'S Pat O'Brien Will Step In As Slayer'S Guest Guitarist | The Official Slayer Site”originalet”Slayer Wins 'Best Metal' Grammy Award””Slayer Guitarist Jeff Hanneman Dies””Kerrang! Awards 2006 Blog: Kerrang! Hall Of Fame””Kerrang! Awards 2013: Kerrang! Legend”originalet”Metallica, Slayer, Iron Maien Among Winners At Metal Hammer Awards””Metal Hammer Golden Gods Awards””Bullet For My Valentine Booed At Metal Hammer Golden Gods Awards””Metal Storm Awards 2006””Metal Storm Awards 2015””Slayer's Concert History””Slayer - Relationships””Slayer - Releases”Slayers officiella webbplatsSlayer på MusicBrainzOfficiell webbplatsSlayerSlayerr1373445760000 0001 1540 47353068615-5086262726cb13906545x(data)6033143kn20030215029