6

POSIX.1-2001 Utilities and POSIX.1-2008 Utilities both list the commands bc and ed to be part of POSIX.

Yet, in a brand new Debian installation (version 10 for example), these commands are missing by default:

$ bc
bash: bc: command not found
$ ed
bash: ed: command not found

Why does Debian not include these commands by default? Of course, I can install them with and I did that.

apt-get install bc ed

The bc binary is only 87K in size. The entire package including the man page and documentation is only 209K in size.

Similarly the ed binary is only 55K in size. The entire package is only 93K in size.

What good reason is there not to include these tiny packages even though they are specified in POSIX?

7
  • When you installed the system, one of the prompts was to install software collections. One of those was something like "standard utilities" or "standard operating system". Did you select that?
    – D. SM
    Commented Sep 12, 2020 at 7:16
  • @D.SM Yes, I did select that. Commented Sep 12, 2020 at 7:28
  • While bc could really be seen as less important, but it is part of the base interfaces. ed is really important as it is frequenly used by shell scripts. Which release are you using?
    – schily
    Commented Sep 12, 2020 at 11:54
  • @schily Debian 10.0 (buster) Commented Sep 12, 2020 at 11:55
  • 1
    @schily I believe Debian and Ubuntu projects make different packaging decisions about what should go into the default install (i.e., the default install from CD or DVD iso images). So what Ubuntu includes by default has no bearing on what Debian includes by default. Commented Sep 12, 2020 at 13:06

2 Answers 2

3

Debian doesn’t aim for strict POSIX conformance in general. Some of the tools mandated by POSIX are, in practice, not that commonly used, and therefore they aren’t included in the “standard” Debian installation.

For most of these tools this situation has evolved over time, so one can find traces of their demotion; see this bug requesting ed’s for example.

Tools that aren’t “essential” in Debian must be explicitly mentioned in the dependencies of other packages which need them, and that also provides some measure of their “popularity”; ed is used by very few packages in Debian, bc by somewhat more. As a result, bc does end up being installed in many configurations.

0
-2

The simple answer is not everyone needs those utilities.

For example, I might deploy an application via Docker that uses Debian as the base OS. In this case I need very few parts of the base OS. For example, the vast majority of Python web applications do not need either bc or ed.

There are other operating systems that follow different philosophies. OpenBSD for example is intended by its developers to be installed "completely". These days they want to install, for example, a complete X environment on all systems. There are users who would rather not have X on headless servers.

Note that according to this Debian does not claim complete POSIX compatibility.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .