Hot answers tagged

57

Market forces. There are many more programs targeted specifically at Linux than at *BSD. A lot of software source code is portable enough that it can be compiled on both, but many software producers that ship Linux binaries do not bother to do so for the BSDs since they have smaller market shares than Linux, across the board.¹ If a piece of software is only ...


43

The traditional BSD hexdump utility uses the platform's endianness, so the output you see means your machine is little-endian. Use hexdump -C (or od -t x1) to get consistent byte-by-byte output irrespective of the platform's endianness.


42

That is a difficult question to answer. First "Unix Like" or "*nix" usually means POSIX. All the systems you listed are POSIX systems. POSIX is a set of standards to implement. Now for the harder questions. GNU isn't really an OS. It's more of a set of rules or philosophies that govern free software, that at the same time gave birth to a bunch of tools ...


41

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 ...


39

No, kernels from different implementations of Unix-style operating systems are not interchangeable, notably because they all present different interfaces to the rest of the system (user space) — their system calls (including ioctl specifics), the various virtual file systems they use... What is interchangeable to some extent, at the source level, is the ...


32

The term "userland" can refer to many things in different contexts, but here I interpret "GNU userland" vs "BSD userland" as the default, minimum set of programs that come with a distribution. The big main difference is that the two userlands start with completely different source code. GNU cat source code NetBSD cat source code. Just from that simple-in-...


32

The Ubuntu bsdtar is actually the tar implementation bundled with libarchive; and that should be differentiated from classical bsdtar. Some BSD variants do use libarchive for their tar implementation, eg FreeBSD. GNUtar does support the other tar variants and automatic compression detection. As visualication pasted the blurb from Ubuntu, there are a few ...


24

1. What are the conceptual and structural differences between a Linux-Kernel and a BSD-kernel? Regarding architecture and internal structures, there are of course differences on how things are done (ie: lvm vs geom, early and complex jail feature for FreeBSD, ...), but overall there are not that much differences between the two: BSD* kernel and Linux kernel ...


22

You are comparing kernel and whole systems. Kernels are just the main central piece of a system, but not all of it. In fact there is no such thing as a Linux system per se, but there are countless "Gnu/Linux" or other Linux Kernel based systems (one being Android). Linus Torvalds choose to concentrate his work on the central piece and successfully manage ...


20

BSDTAR vs TAR plus much more Here is one benefit!! I'm going to go into 5 topics here (and go way off topic, but it will cover what you want as well): bsdtar vs tar sparse files vs not thick and thin files/luns with btrfs thick and thin files/luns without btrfs diff between thick and thin and how it doesn't apply to just luns bsdtar handles sparse ...


19

Linux is not an OS, it's a kernel. Linux by itself has no 'userland' environment (no apps, no commands, no ...etc...). If you want to have a complete OS, you have to add an userland to your kernel. Historically, for Linux, it's GNU. All(?) Linux distributions are not 'real Linux' distributions. They are GNU/Linux (GNU + Linux) distributions. BSD is a 'unix-...


17

Well, first off, you speak of BSD as if they're is only one. Technically, I suppose, there is the original one they were all derived from—last release was in 1995. Searching for "4.4-Lite2" finds several copies, you can find out more about it at the Wikipedia's Berkeley Software Distribution article. Derived from it are—among many things*—FreeBSD, OpenBSD, ...


17

I've found a solution on my own by deep reading man lsof. (Yes, RT*M still helps.) Thanks @Gilles for aiming. Here is the solution: lsof -aPi -p 555 (555 is the PID). Explanation: -p to specify the PID number; -i to display only network devices; -a to AND two conditions above (otherwise they will be ORed); -P to display port numbers (instead port names by ...


14

From the Ubuntu package description: The bsdtar program has a number of advantages over previous tar implementations: Library. Since the core functionality is in a library, it can be used by other tools, such as pkg_add. Automatic format detection. Libarchive automatically detects the compression (none/gzip/bzip2) and format (old tar, ustar, ...


14

OpenBSD and your VM are working right; you are mis-using the Google time source. This is in the OpenBSD Frequently Asked Questions and manual pages. You are synchronizing to a time source that publishes UTC time, sort of. But by default rdate assumes that your time source publishes TAI-10 time. TAI, a strict uniformly increasing count of all SI seconds ...


14

There are a number of implementations, e.g. Mattias Andrée's sha3sum, or the Perl Digest-SHA3 module. In Debian, install libdigest-sha3-perl; in Fedora, install sha3sum; both of these will provide a sha3sum command based on the Perl module, which behaves in the same way as the binaries you're used to.


14

You can use OpenSSL to do this, The below is demonstrated with OpenSSL 1.1.1 11 Sep 2018, from Ubuntu 18.10. OpenSSL> help ... Message Digest commands (see the `dgst' command for more details) blake2b512 blake2s256 gost md4 md5 rmd160 sha1 sha224 sha256 ...


12

There are literally hundreds of different Linux-based systems, compared to a handful of BSDs (and a somewhat larger number of propietary Unix systems). Some speculate that the coherence of the Linux kernel (all Linux systems share more or less the same kernel; there are variants, like Android's, or more or less severely patched "enterprise" systems, but ...


12

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 ...


11

Login classes has been a part of FreeBSD for as long I can remember. It allows the system administrator (root) to set resource constraints for users, or a group of users as configured in /etc/login.conf. This is particularly useful on multi-user servers such as webhosting and shell providers. These kind of constraints involves: CPU utilization Memory ...


11

On some Unix-style systems (BSDs and macOS), CtrlT sends SIGINFO to the running process. Some commands handle this directly; otherwise, it’s handled by the kernel, and that’s what produces the output you’re seeing. SIGINFO on GNU Linux (Arch Linux) missing has more on the topic.


11

Is it a safe bet to assume... Not trying to be pedantic or flippant, but it's not to safe to assume anything in technology (or even in life, for that matter). If something runs in one distribution of Linux, there's no guarantee that it will run in another. Bring in a completely different OS and, as you put it, all bets are off! BSD ≠ Linux; both are very ...


10

You're question is pretty general, so I'll just take a little stab at the NetBSD part: The webpage of NetBSD's vax port lists supported machines (such as yours), many can use NetBSD 6.0.1, some are only supported in -current. It also points to VAXarchive, a website collection some information that might help you further. It also points to the vax port of ...


10

There is no correlation between the number of processes and the “clarity” of an operating system. You are comparing apples and gooseberries. On a Linux system, ps ax will show a lot of processes that consume no memory and have a name in square brackets, like this: root 2 0.0 0.0 0 0 ? S Nov02 0:01 [kthreadd] root 3 0....


10

It's all because of a person by the name of Albert D. Cahalan. Xe did not know BSD. The original ps command for Linux was written and first published in March 1992 by Branko Lankester. It was later to become known as "kmem-ps" to distinguish it from "proc-ps" that was published in December 1992 by Michael K. Johnson. M. Lankester's ps ...


10

I just can give you an overall answer: Command line options are often parsed using the library function getopt. Originally it only accepted arguments consisting of a - followed by a symbol. This effectively limits the amount of options you have, more or less -A to -Z, -a to -z and -0 to -9. You can imagine that you will not use an option without at least a ...


10

Macs use the BSD version of utilities such as sed and date, which have their own idiosyncrasies. In this specific case, the BSD build of sed mandates the extension for the backup file with -i, rather than it being optional, as in GNU sed. As such: sed -i .bak 's/needle/pin/g' haystack The shown command will replace all instances of needle with pin in the ...


9

The only reliable way to write scripts that support different operating systems is to only use features that are defined by POSIX. For things like your personal shell configurations, you can use hacks that fit your specific use case. Something like the following is ugly, but will accomplish the goal. if ls --version 2>/dev/null | grep -q 'coreutils'; ...


Only top voted, non community-wiki answers of a minimum length are eligible