What is bsd in linux

What is the difference between standard syntax and BSD syntax?

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

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

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

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

4 Answers 4

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

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

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

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

Читайте также:  Mount nfs linux пример

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

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

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

Источник

An Overview of BSD UNIX Operating System [A Brief Guide]

An operating system is an inseparable part of modern computers. Modern, light, and intuitive started with the development of UNIX. Then slowly, many operating systems started making their appearance. BSD was one of the first operating systems based on UNIX, then became an open-source platform for users. Even today, BSD extensively uses servers, networks, and embedded systems.

What is BSD UNIX?

BSD UNIX logo

BSD (Berkeley Software Distribution) is an operating system developed at the University of California at Berkeley in 1978. BSD is a UNIX- like operating system, which at first was quite different from UNIX. But then shared much of the source code from the original research UNIX operating system.BSD was developed in C programming language by Jordan Hubbard. Even though it was the first open-source UNIX operating system, it had some legal disputes with AT&T . From that incident, the GNU project and Linux kernel were born, resulting in the full Linux OS. BSD has a monolithic kernel with all the system-level programs and files stored in kernel space. This kernel has the advantage of programs interacting with the hardware directly, using a common system resource.

Читайте также:  Как разбить диск при установке linux

Versions of BSD

BSD UNIX versions

Just like Linux, BSD has many versions available for open-source usage. Different versions have different objectives in mind. Here are some of the most used BSD systems.

OpenBSD

This version of BSD focuses on security. With an open-source concept and strict code reviews, the security and purity of the system are achieved. Organizations like banks, Governmental departments rely on this secured platform.

FreeBSD

This platform focuses on performance and ease. There are more users of this version than any other BSD version. Many web content providers use this platform for fast and reliable performance.

NetBSD

This is another platform that focuses on portability. Thus, this version can run on many types of devices, from palm-top devices to servers. Even NASA used this platform for space missions. NetBSD is especially useful for old non-intel devices.

DragonflyBSD

This BSD platform is performance and scalability centered. They can run on single-node systems to a large clustered system efficiently.

Advantages of BSD over Linux

  • BSD runs really well with less powerful hardware. Because it was developed at a time when hardware had many limitations, on the other hand, Linux is more flexible but not that focused on old and slower hardware.
  • BSD doesn’t necessarily require drivers for different hardware. You can run BSD by setting the kernel on the available hardware, and that’s it. But Linux requires drivers for various hardware. This advantage results in a more secure overall system for BSD, as Linux or other operating systems, must deal with many drivers that make the operating system less sustainable and less secure.
  • BSD has continued for almost 44 years, and with all these years running, it has become very stable. The core of the system is so stable that there are close to no bugs in the system. However, Linux is modified worldwide, with many developers working on it. As a result, it is less stable, with occasional bugs here and there. But still, Linux is much better in condition compared to windows which had to deal with such a variety of hardware and drivers.
  • You can run BSD on older hardware. It was built to work on old intel systems with UNIX experience. But Linux is limited to modern X86, ARM, and a handful of other hardware.
  • BSD is a complete operating system where Linux is actually a kernel. To run Linux, you must install a distribution with many other tools like GNU tools, additional packages, third-party application documentation, etc.
Читайте также:  Linux kernel symbols debug

Advantages of Linux over BSD

Just like its significant advantages, there are also some disadvantages to BSD. Here are 5 disadvantages of BSD compared to Linux.

  • Linux has more application support, both built-in and third-party. Much commercial software is not available in BSD, but there is enormous software support worldwide in Linux.
  • Linux has GNU General Public License, but BSD has its own license. But BSD also has some open-source platforms that have significant use in specific fields.
  • Linux has quick support for any type of application, package, or bug. But in BSD, there’s a conservative approach to software support. So the software support may not be as quick, but in return, there is greater stability and fewer bugs than other operating systems.
  • BSD does not have a graphical user interface officially. Yes, some distros available have a graphical desktop interface, but many of them get discontinued due to less usage. On the other hand, Linux has many distros that provide great GUI out of the box, which can be used as a daily driver.
  • Resource on BSD is comparatively smaller than Linux. So, there’s a steep learning curve for BSD.

Usage of BSD

BSD UNIX Usage

The most prominent use of BSD is not in everyday use for consumers but in commercial servers, data centers, and networks. Here are some of the sectors that have comprehensive use of BSD.

Servers

BSD is a stable operating system focusing on efficient server applications. BSD even has dedicated applications and packages for easy configuration and usage. There are used in FTP servers, mail servers, DNS servers, and routers.

Networking

BSD has extensive use in network systems and protocols. It supports a wide range of networks like IPv6, IPsec, and SCTP. It even supports many legacy protocols and CARP (Common Address Redundancy Protocols). CARP has many advantages but mainly helps in multiple nodes for a common set of IP addresses so that crashing in only one node does not disable the whole server, and another node can take the lead.

Portability

BSD operating system has much portability as it has excellent support for older devices, and driver support is not an issue as it can be configured with other hardware. The support for different hardware is divided into many different tires. Tire 1 architecture has complete support, whereas tier 4 architecture has no support at all.

Embedded System

BSD was developed for much different hardware and supported hardware from intel, PowerPC, MIPS, and ARM of much older versions.

Conclusion

BSD is a UNIX-based operating system that has many open-source versions. However, they are not actually for everyday use by consumers. It has had support for almost 44 years and continues to be used by servers and networks. BSD’s security, stability, and absence of bugs make it an excellent choice for commercial and embedded system usage.

Similar Readings

Источник

Оцените статью
Adblock
detector