# FreeBSD talked about over at Hackaday



## 8bitGlitch (Feb 9, 2021)

Original article posted over at Hackaday, (Holding A Mirror Up In Front Of GNU/Linux by Jenny List) (not sure if we can post links, so didn't)

Good to see we are getting talked about on other forums; however, what does this poster mean? "enable FreeBSD’s Linux software compatibility layer and install the BASH shell." Are they referring to some differences in GNU tools? Does anyone know what they could be referring to?


Original source:


> Drone says:
> February 8, 2021 at 11:10 pm
> 
> @Alexander Wikström said: “Where distros are sprung up both left and right for the pure purpose that one can. It is a bit like a wild west… BSD is partly in a similar boat, due to being open source. We already have FreeBSD, Dragonfly, NetBSD and openBSD to name the large ones.”
> ...


----------



## scottro (Feb 9, 2021)

I hope links are allowed, I post 'em all the time, often to my own pages (no ads on said pages though, so I don't consider myself a spammer).
Anyway, you don't need the Linux compatibility layer to install bash. Just `pkg install bash` and it's there.

Without having yet found the link and looked at the article, I'd have to disagree with your quote. Free and OpenBSD have fairly large userbases, including commercially. I would guess that both Net and DragonFly have much smaller userbases, for better or worse. DragonFly has the hammer file system which is supposed to be great, but I don't know if it's considered production ready, and if there are many companies using it.

Here is the link, so if there is any blame, it's my fault, not yours, but as far as I know, posting links is allowed (within reason, I suppose posting links to porn sites, for example, would be frowned upon).









						Holding A Mirror Up In Front Of GNU/Linux
					

We’re guessing that we have something in common with a substantial number of our readers in that this post is being written on an open-source operating system. A well-known GNU/Linux distribu…




					hackaday.com


----------



## 8bitGlitch (Feb 9, 2021)

scottro said:


> I hope links are allowed, I post 'em all the time, often to my own pages (no ads on said pages though, so I don't consider myself a spammer).
> Anyway, you don't need the Linux compatibility layer to install bash. Just `pkg install bash` and it's there.
> 
> Without having yet found the link and looked at the article, I'd have to disagree with your quote. Free and OpenBSD have fairly large userbases, including commercially. I would guess that both Net and DragonFly have much smaller userbases, for better or worse. DragonFly has the hammer file system which is supposed to be great, but I don't know if it's considered production ready, and if there are many companies using it.
> ...


I left the GNU toyland for BSD for my personal items. The license makes more sense to me, so I sort of had issues with the full topic and discussion over at Hackaday just as you.


----------



## SirDice (Feb 9, 2021)

Why would links not be allowed here? Only if you post links to obvious troll sites, false information or "warez" would we remove them. 



8bitGlitch said:


> what does this poster mean? "enable FreeBSD’s Linux software compatibility layer and install the BASH shell."


The bash shell (shells/bash) is the de facto standard shell on most Linux distributions. It's not installed by default on FreeBSD, so many Linux converts/rejects/refugees (or whatever you want to call them, each and every one will have their own reason(s) for switching) install it because they're familiar with it. For the same reason I typically install tcsh on Linux, I'm familiar with it and muscle memory is difficult to change. As for the Linux ABI layer, that just allows you to run Linux binaries on FreeBSD. Lots of free software isn't open source and only available in binary form. Most of these only have Windows, MacOS or Linux binaries available. The Linux compatibility makes it possible to run a lot of them on FreeBSD. It's not 100% compatible but it works really good.

NB. I love Hackaday. Big fan of Bil Herd.


----------



## shkhln (Feb 9, 2021)

8bitGlitch said:


> Good to see we are getting talked about on other forums; however, what does this poster mean? "enable FreeBSD’s Linux software compatibility layer and install the BASH shell." Are they referring to some differences in GNU tools? Does anyone know what they could be referring to?
> 
> 
> Original source:


Seems like a yet another rehash of the usual security-features-portability meme. Is there anything to discuss?


----------



## Deleted member 30996 (Feb 9, 2021)

I only install a small numuber of 3rd party programs using port-mgmt/portmaster and it pulls in what else is installed with them. shells/bash isn't one I install to use but gets pulled in with one of the others by the Master of Ports every time. I can pull up the man page now.


----------



## 8bitGlitch (Feb 9, 2021)

SirDice said:


> Why would links not be allowed here? Only if you post links to obvious troll sites, false information or "warez" would we remove them.
> 
> 
> The bash shell (shells/bash) is the de facto standard shell on most Linux distributions. It's not installed by default on FreeBSD, so many Linux converts/rejects/refugees (or whatever you want to call them, each and every one will have their own reason(s) for switching) install it because they're familiar with it. For the same reason I typically install tcsh on Linux, I'm familiar with it and muscle memory is difficult to change. As for the Linux ABI layer, that just allows you to run Linux binaries on FreeBSD. Lots of free software isn't open source and only available in binary form. Most of these only have Windows, MacOS or Linux binaries available. The Linux compatibility makes it possible to run a lot of them on FreeBSD. It's not 100% compatible but it works really good.
> ...


I still have my original C128...  So Bil Herd is the dude!!!


----------



## 8bitGlitch (Feb 9, 2021)

SirDice said:


> Why would links not be allowed here? Only if you post links to obvious troll sites, false information or "warez" would we remove them.
> 
> 
> The bash shell (shells/bash) is the de facto standard shell on most Linux distributions. It's not installed by default on FreeBSD, so many Linux converts/rejects/refugees (or whatever you want to call them, each and every one will have their own reason(s) for switching) install it because they're familiar with it. For the same reason I typically install tcsh on Linux, I'm familiar with it and muscle memory is difficult to change. As for the Linux ABI layer, that just allows you to run Linux binaries on FreeBSD. Lots of free software isn't open source and only available in binary form. Most of these only have Windows, MacOS or Linux binaries available. The Linux compatibility makes it possible to run a lot of them on FreeBSD. It's not 100% compatible but it works really good.
> ...



When you say from source and binary - meaning from the upstream provider, or directory from the maker. Compatibility issues would be with libraries used, which might not be available on FreeBSD? I am still transitioning over to FreeBSD from CentOSville, and learning as a go.


----------



## SirDice (Feb 9, 2021)

8bitGlitch said:


> When you say from source and binary - meaning from the upstream provider, or directory from the maker.


If the sources are available then you can attempt compiling it for FreeBSD natively. This might require a bit of patching but most of the time this is quite doable. The plethora of ports are a prime example of that. If there's no source available but only Linux binary distributions then you're going to need the Linux Compatibility layer to "emulate"[*] a Linux kernel. The standard userland for Linux binaries is CentOS 7 (emulators/linux_base-c7). So ideally you can run a Linux binary built for CentOS/RedHat 7 without much issues. Besides the standard CentOS 6 and 7 "linux_base" ports, people, including myself, have set up a Debian environment. CentOS/RedHat tends to lag a little behind when it comes to things like glibc for example. Debian/Ubuntu have a newer version of that important library. Back when I started with FreeBSD there were actually a lot more choices for picking a "linux_base". Unfortunate these disappeared over time. Mainly because it takes a lot of time and effort to keep all of them maintained. 

[*] I know it's not emulation. They're stubs hooking the Linux calls to FreeBSD equivalent calls. But for the sake of argument you can consider it a form of emulation. It just makes it easier to explain. In essence it works in a similar fashion as wine does for running Windows applications on Linux or FreeBSD.


----------



## Beastie7 (Feb 9, 2021)

I thank the developers and all who contributed to the Linuxulator and WINE. It's a shame we have to hack our way to application support made by developers who neglect OS agnosticism.


----------



## msplsh (Feb 9, 2021)

Beastie7 said:


> It's a shame we have to hack our way to application support made by developers who neglect OS agnosticism.


I don't blame them.  If it was easy with source available, then everybody would do it.


----------



## 8bitGlitch (Feb 9, 2021)

Ok, just so I understand, since this is a new topic for me. FreeBSD emulates a Linux environment, so I could run applications there coded for CentOS7 for example? I am not fully understanding. The only real Linux experience I have is installing CentOS, then installing: Ansible, Cacti, Nagios and Rancid. 

But after I found FreeBSD, and got me thinking hard about the direction of Linux, and what really the GNU/GPL license really details.


----------



## drhowarddrfine (Feb 9, 2021)

Chapter 11. Linux Binary Compatibility
					

FreeBSD provides binary compatibility with Linux, allowing users to install and run most Linux binaries on a FreeBSD system without having to first modify the binary




					docs.freebsd.org


----------



## msplsh (Feb 9, 2021)

The linux emulation layer only does binaries, which means you have to have something already compiled like a RPM.  Based on how you've used Linux, don't worry about it until you have a piece of software that only works on Linux that you absolutely need to run.  How it's going to "work" for you is going to depend on what it is and how you get the binary, so no need to get into it.


----------



## ralphbsz (Feb 10, 2021)

8bitGlitch said:


> Ok, just so I understand, since this is a new topic for me. FreeBSD emulates a Linux environment, so I could run applications there coded for CentOS7 for example?


It's not about a program being *coded* for Linux or CentOS. The compatibility layer allows running programs that have been *compiled* for Linux or CentOS. Why would one want to run stuff that has already been compiled for a different platform? There are several reasons. One might be that the source code is not available, and the application is being distributed in binary form only. Another reason might be that compiling is a lot of extra work and tedious (in particular if it requires installing a lot of development libraries), and simply running the executable can be much quicker and more efficient. Not in terms of instantaneous CPU cycle consumption (which is likely higher, although in many cases only marginally so), but in terms of human effort. The idea of code that only needs to be written/compiled once and can then run anywhere has been a huge goal of the computer industry for a long time, and virtualization / emulation environments are one part of that.



> But after I found FreeBSD, and got me thinking hard about the direction of Linux, and what really the GNU/GPL license really details.


The difference in licenses is much less important than people think. All the ideologies and theorists tend to get terribly hung up on the licensing aspect, and on the freedom that the GPL or other OSS license either give or take (depending on your standpoint). RMS is the prime example. Today, licenses matter greatly to lawyers (the GPL alone is the full employment act for IP lawyers!) and to teenagers who discuss them.


----------



## shkhln (Feb 10, 2021)

ralphbsz said:


> The difference in licenses is much less important than people think.


Indeed, a sufficiently large corporation can work around pretty much any GPL conditions trying to restrict them. Android (a quite well locked down system) is a primary example of that. Google does have permissively licensed Fuchsia in the works, though.


----------



## 8bitGlitch (Feb 10, 2021)

ralphbsz said:


> It's not about a program being *coded* for Linux or CentOS. The compatibility layer allows running programs that have been *compiled* for Linux or CentOS. Why would one want to run stuff that has already been compiled for a different platform? There are several reasons. One might be that the source code is not available, and the application is being distributed in binary form only. Another reason might be that compiling is a lot of extra work and tedious (in particular if it requires installing a lot of development libraries), and simply running the executable can be much quicker and more efficient. Not in terms of instantaneous CPU cycle consumption (which is likely higher, although in many cases only marginally so), but in terms of human effort. The idea of code that only needs to be written/compiled once and can then run anywhere has been a huge goal of the computer industry for a long time, and virtualization / emulation environments are one part of that.
> 
> 
> The difference in licenses is much less important than people think. All the ideologies and theorists tend to get terribly hung up on the licensing aspect, and on the freedom that the GPL or other OSS license either give or take (depending on your standpoint). RMS is the prime example. Today, licenses matter greatly to lawyers (the GPL alone is the full employment act for IP lawyers!) and to teenagers who discuss them.


Oh, now that makes sense about "running programs that have been compiled for linux" - thank you for pointing that out. I guess since I used the 'repo' and a newer RPM to install the networking management/maintenance apps I required were classed as 'compiled' already for the OS, since I didn't get from source.

-Side trek (then back on topic) -
I am always fascinated how IP help innovation, but also hurt it at times. But I guess what got me thinking about FreeBSD is when I saw all these major companies claim to be using a BSD based OS for their embedded OS, as oppose to Linux kernel. I guess they could have used some flavor of OS that was based on the Linux kernel like they do for satellites and and some autonomous robots, but it was a breath of fresh air to learn about something new.

I am looking forward to my journey through the land of FreeBSD. But still learning, and with the guidance from everyone I will be a better FreeBSD user.  Yet, I still find it fascinating why a company for a commercial hardware OS, or solution would select FreeBSD over a Linux Kernel based solution, so I guess I associated the BSD vs GPL License model as a motivator.

Example: Cisco Nexus line of Data Center switches uses a modified CentOS (I think 6/7) operating system. Even when the darn things boot you see the GPL license and all the blah blah blah openness, so I guess their network emuation is closed source. While Juniper uses a BSD based OS, and Nokia uses their own, but I think it is a hybrid of BSD based or closer to QNX (not sure, only worked on a few Nokia items).


----------

