8

I have a dash shell installed as /bin/dash. I checked the manual of dash, which is the same as the POSIX shell manual, and there is nothing there to tell the version of the shell.

dash --version

does not work.

How to tell the version number of dash I have??

Added: some people are pointing me to Ubuntu commands, well, no I am not running Ubuntu, I am running Centos.

rob mayoff
  • 375,296
  • 67
  • 796
  • 848
Mark Galeck
  • 6,155
  • 1
  • 28
  • 55
  • 1
    See http://askubuntu.com/questions/283134/how-to-find-the-version-of-the-dash-shell-on-ubuntu-bin – Jeff Foster Apr 16 '16 at 06:09
  • Yes I know of this - I am not running Ubuntu – Mark Galeck Apr 16 '16 at 06:16
  • The accepted answer is CentOS-specific; also see [*How to find out the version number of `dash` without resorting to package management systems?* - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/416760/how-to-find-out-the-version-number-of-dash-without-resorting-to-package-manage). – Franklin Yu Jan 02 '23 at 20:41

2 Answers2

3

dpkg -s

Run the following command:

dpkg -s dash
harsh_v
  • 3,193
  • 3
  • 34
  • 53
1

On systems like Centos that use rpm:

rpm -q dash
rob mayoff
  • 375,296
  • 67
  • 796
  • 848
  • 2
    not everyone has a package manager though – 123 Oct 14 '21 at 02:15
  • 1
    Echo the comment above. For example, how do you check the Dash version on macOS? – Franklin Yu Jan 02 '23 at 20:27
  • This question is tagged `linux` and `centos`, so it would be better to post a new question about macOS. Anyway, as far as I can tell, there is no way to identify the version of `/bin/dash` that ships with macOS. Its SCCS ident string is `@(#)PROGRAM:dash PROJECT:dash-12`. There is no version 12 in [the dash git repository](https://git.kernel.org/pub/scm/utils/dash/dash.git). I could not find the dash source code on [Apple's open source distribution site](https://opensource.apple.com/releases/). – rob mayoff Jan 02 '23 at 21:05