How to know if a specific command (e.g. bc) is available in an original Ubuntu?

Ralf Mardorf kde.lists at yahoo.com
Wed Mar 3 18:58:08 UTC 2021


On Wed, 3 Mar 2021 10:30:33 -0500, Little Girl wrote:
>It occurs to me that I may have misunderstood your question

On Wed, 3 Mar 2021 09:59:31 +0800, sunshilong wrote:
>I have to invoke the commands that are available on Ubuntu 16.04(i.e
>the commands that need to be manually installed should not be called).

https://www.dict.cc/?s=invoke
https://www.dict.cc/?s=der+zauberlehrling
https://en.wikipedia.org/wiki/Linux_Standard_Base

In any case of doubt, if I want to write a "portable" script I tend to
chose "dash", see
http://manpages.ubuntu.com/manpages/xenial/man1/dash.1.html . In
addition I would favour e.g. printf over echo.

I wouldn't rely on anything else, such as the Linux standard base or a
particular release of Ubuntu. Without taking Ubuntu flavours into
account, what actually is an Ubuntu 16.04 default install? Does it
include or exclude a minimal server image install? Is there a difference
between 16.04 and 16.04.7? And so on and so forth.

OTOH see
https://www.gnu.org/software/bash/manual/html_node/Bash-POSIX-Mode.html

Why 16.04? Is compatibility to other Ubuntu releases unneeded, let
alone compatibility with different Linux distros, FreeBSD or something
else? If so why?

Is it just about commands such as "bc"? Or are commands such as
"firefox" are important, too?

Would it be reasonable to list all commands in PATH when running an
Ubuntu 16.04 live media?






More information about the ubuntu-users mailing list