Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
42 votes

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

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 ...
JdeBP's user avatar
  • 69.1k
39 votes
Accepted

Are different Linux/Unix kernels interchangeable?

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 ...
Stephen Kitt's user avatar
33 votes

How can I generate SHA3 if there is no sha3sum command in coreutils?

You can use OpenSSL to do this. Run openssl list -digest-algorithms to get a list of algorithms: ... SHA3-224 SHA3-256 SHA3-384 SHA3-512 ... As you can see sha3-{224,256,384,512} is supported by ...
Evan Carroll's user avatar
  • 31.2k
27 votes
Accepted

What is the bsdutils package on Debian? What is a "BSD-style Unix system"?

In the beginning, there was Unix, which was a product developed by Bell Labs (a subsidiary of AT&T). A lot of groups customized their copy and added their own programs, and shared their ...
Gilles 'SO- stop being evil''s user avatar
24 votes
Accepted

How to know which ports are listened by certain PID?

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 ...
shau-kote's user avatar
  • 622
23 votes

BSD sed vs. GNU sed, and -i

macos uses the FreeBSD implementations of utilities such as sed and date, which often have a different interface than GNU's in areas not covered by the POSIX standard. -i is not a standard option of ...
DopeGhoti's user avatar
  • 76.4k
22 votes

How can I generate SHA3 if there is no sha3sum command in coreutils?

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 ...
Stephen Kitt's user avatar
22 votes

Modern OS on Ancient Hardware (i486SX, 8 MB of RAM)

Provided you get the possibility to cross-compile on whatever other system, the only solution I know is to… do it yourself from sources, you will need : The linux kernel. the 5.4 version should fit. ...
MC68020's user avatar
  • 8,211
21 votes

UNIX-, BSD-, GNU-options in Linux's ps command. Where are they from?

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 ...
JdeBP's user avatar
  • 69.1k
17 votes

Modern OS on Ancient Hardware (i486SX, 8 MB of RAM)

FreeBSD support 80486 and onward CPUs Arch Linux 32-bit still support i486 processor for most non-graphical packages. You may need to do some tweak to use sf. Update: Read this Retrocomputing SE ...
Abdullah Ibn Fulan's user avatar
14 votes
Accepted

OpenBSD 6.0 ntpctl says "clocked synced" but is ~26 seconds behind

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 ...
JdeBP's user avatar
  • 69.1k
13 votes

How can I generate SHA3 if there is no sha3sum command in coreutils?

RHash application could do it: rhash --sha3-256 yourfile More info: rhash -h it will work on Linux, BSD and Windows
monday's user avatar
  • 131
13 votes
Accepted

What is login class in bsd?

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....
William Sandin's user avatar
13 votes
Accepted

What happens on pressing Ctrl-T in a terminal when a program is running?

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 ...
Stephen Kitt's user avatar
12 votes

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

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 ...
Peschke's user avatar
  • 4,166
12 votes

What is the bsdutils package on Debian? What is a "BSD-style Unix system"?

These are all tools which originally came from BSD (4.4BSD). Their usefulness isn’t based on their origin; they’ve been included in Linux distributions for a long time, and in fact the current ...
Stephen Kitt's user avatar
11 votes

If Linux runs well on a laptop, will BSD run too?

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 ...
Allan's user avatar
  • 1,050
11 votes
Accepted

How to quit the `mg` editor?

Ok, so I'm not sure what the ' means here, but pressing ctrlx and ctrlc actually worked: C-x C-c' save-buffers-kill-emacs save-buffers-kill-emacs Offer to save modified buffers and quit mg.
ruohola's user avatar
  • 282
10 votes

Modern OS on Ancient Hardware (i486SX, 8 MB of RAM)

Abdullah Ibn Fulan’s answer gives pointers to BSDs and Linux distributions which support your CPU, but you’ll find that 8MiB of RAM is too little to do anything useful with a modern system. Another ...
Stephen Kitt's user avatar
9 votes

Modern OS on Ancient Hardware (i486SX, 8 MB of RAM)

MC68020 suggested you build your own Linux system by cross-compiling from sources. I do not know whether this is the best solution for you but, if you are going to explore this route, I suggest you ...
Edgar Bonet's user avatar
8 votes
Accepted

Are there standard versions of `sed` on which `-E` is unsupported?

GNU first added undocumented support for -E just to be compatible with BSD syntax, and the source included the comment /* Undocumented, for compatibility with BSD sed. */ But in 2013 that was ...
Eric Renouf's user avatar
  • 18.5k
8 votes
Accepted

Newlines in BSD sed vs gsed

BSD sed, when using l to output characters in a visually unambiguous form, does not output newlines in a visually unambiguous form. From sed(1) on OpenBSD: [2addr]l (The letter ell.) ...
Kusalananda's user avatar
  • 336k
8 votes

Modern OS on Ancient Hardware (i486SX, 8 MB of RAM)

Here's a nice overview of "light" Linux distros: https://en.wikipedia.org/wiki/Light-weight_Linux_distribution I've just tried Damn Small Linux and unfortunately it only works when you have ...
Artem S. Tashkinov's user avatar
7 votes

is there a Base64-based dist?

No. I don't think there are any processors that can deal with Base64-encoded data, and that'd be a pretty hard requirement for storing data that way in RAM (at least as far as Linux is concerned). If ...
derobert's user avatar
  • 110k
7 votes
Accepted

How to install man pages for certain libc functions?

You should install manpages-dev, which provides manpages for system calls and a number of library functions, and the -dev and (if any) -doc packages for the libraries you’re developing with. For ...
Stephen Kitt's user avatar
7 votes
Accepted

What does "ln -t" do

The -T (--no-target-directory) option to GNU ln provides a safety feature that may be useful in scripts. Suppose that you want to create a new name, $newname, for a file $filename, where the new name ...
Kusalananda's user avatar
  • 336k
7 votes

Using "shred" on BSD systems

The answer that qorg11 gave is the technically accurate answer to your question (so go and upvote it!). The reality is that shred is useless. All BSDs, as well as Linux, have modern file systems, ...
Marcus Müller's user avatar
6 votes

How to know which ports are listened by certain PID?

lsof provides information about files opened by processes, including network ports. It's available on pretty much all unix systems, including OSX. The Rosetta Stone for Unix doesn't list any other ...
Gilles 'SO- stop being evil''s user avatar
6 votes
Accepted

How do I make BSD seq not output + and e when using large numbers?

So you want to display the results without scientific notation? Try this: seq -f "%.0f" 4000000 4100000 So I'm actually changing the format (using -f) into a floating-point format with 0 decimal ...
Erik van de Ven's user avatar

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