[comp.unix.questions] How to find VERSION of UNIX OS

madhua@mars.njit.edu (madhu aiyappen ) (05/22/91)

The subject says it - what is the command to find
the Version and Release of UNIX Operating System
(other than finding it in /etc/motd)?

Any simple commands? Thanks for any help.

hunt@dg-rtp.rtp.dg.com (Greg Hunt) (05/23/91)

In article <1991May22.163628.12135@njitgw.njit.edu>, madhua@mars.njit.edu (madhu aiyappen ) writes:
> 
> The subject says it - what is the command to find
> the Version and Release of UNIX Operating System
> (other than finding it in /etc/motd)?

Try "uname -a".  You should get the version, release, and several
other tidbits.  Take a look at the man page for uname for more
details (and to make sure your system has a uname command).  Enjoy!

-- 
Greg Hunt                        Internet: hunt@dg-rtp.rtp.dg.com
DG/UX Kernel Development         UUCP:     {world}!mcnc!rti!dg-rtp!hunt
Data General Corporation
Research Triangle Park, NC, USA  These opinions are mine, not DG's.

jimr@hplsdv7.COS.HP.COM (Jim Rogers) (05/23/91)

If you have a SYSV derivative of **UX you can use the "uname" command.

uname -rv

This will print the current release and version number of your **UX 
operating system to stdout.


Jim Rogers
Hewlett-Packard Company

kepowers@mbunix.mitre.org (Powers) (05/23/91)

>Try "uname -a".  You should get the version, release, and several
>other tidbits.  Take a look at the man page for uname for more
>details (and to make sure your system has a uname command).  Enjoy!

This works on an SG but not on Ultrix or SunOS.

-- 
----------

Kelly-Erin Powers		The MITRE Corporation
Unix Systems Group		Burlington Road
(617) 271-2143			Bedford, MA 01730
kepowers@mbunix.mitre.org	your_neighborhood!linus!mbunix!kepowers

tmurphy@convex.com (Tom Murphy) (05/23/91)

In <1991May23.154837.17537@linus.mitre.org> kepowers@mbunix.mitre.org (Powers) writes:

>>Try "uname -a".  You should get the version, release, and several
>>other tidbits.  Take a look at the man page for uname for more
>>details (and to make sure your system has a uname command).  Enjoy!

>This works on an SG but not on Ultrix or SunOS.

This works for Ultrix, and ConvexOS :

Ultrix :

VAX> adb -k /vmunix /dev/mem
sbr 80090f18 slr 8b6a
p0br 80c5ae00 p0lr 12e p1br 8045c200 p1lr 1fffea
version/s
_version:
_version:       Ultrix-32 V3.0 (Rev 66) UWS V2.0 (BL 10.0) System #2: Mon Jan 14
 16:21:22 CST 1991

Convex :

CONVEX> adb -k /vmunix /dev/mem
sdr[0] = 00200010  sdr[1] = 00000000  sdr[2] = 00000000  sdr[3] = 00200210
sdr[4] = 00000000  sdr[5] = 00000000  sdr[6] = 00000000  sdr[7] = 00000000
Convex Debugger ($Date: 88/09/21 15:51:31 $)
Use ')help' for help.
(adb) version/s
_version:       ConvexOS -- Version 9.0.7.0.4 Tue May 14 10:25:57 CDT 1991
(adb)


--
  tgm
================================================================================
Tom Murphy -- tmurphy@convex.com             CONVEX Technical Assistance Center
COVUE/Utilities Product Specialist

cook@news.colorado.edu (Richard L. Cook) (05/24/91)

>>Try "uname -a".  You should get the version, release, and several

>This works on an SG but not on Ultrix or SunOS.

This works fine under ULTRIX -- if your ULTRIX is up-to-date!  Some of
our workstations are, others aren't, which made it easy to check on this
and under 4.1 (and presumably 4.0) uname works as expected.  It also
works on my PC and as my MKS toolkit manual notes uname comes to us
from the AT&T flavor of UNIX (which makes SunOS a bit of a mystery -- I
thought it was really AT&Sun but I don't have a Sun handy).  The toolkit
manual also points out that uname conforms to POSIX.2 as well as the
X/OPEN Portability Guide so we should see it VMS Real Soon Now!

The direction most UNIXen are headed in is towards a merging of the
best of System V and BSD which is what the standards efforts end up
formalizing.  As another example, ULTRIX 4.0 was where the Korn shell
(the only shell game worth playing...:-) popped up.  I don't think it
came with System V by default until release 4; it's the only shell that
comes with the MKS toolkit although you can always continue to use
COMMAND.COM on the PC if you want...;-)

--
Richard cook@spot.Colorado.EDU | cook@Colorado.BITNET | +1.303.492.2148
Social Science Data Analysis Center, University of Colorado, Boulder

weimer@garden.ssd.kodak.com (Gary Weimer (253-7796)) (05/24/91)

In article <1991May23.154837.17537@linus.mitre.org>,
kepowers@mbunix.mitre.org (Powers) writes:
|> >Try "uname -a".  You should get the version, release, and several
|> >other tidbits.  Take a look at the man page for uname for more
|> >details (and to make sure your system has a uname command).  Enjoy!
|> 
|> This works on an SG but not on Ultrix or SunOS.

It does work in SunOS 4.1.1 on a Sun4 (but not in SunOS 4.0.3 on a Sun3).

weimer@ssd.kodak.com ( Gary Weimer )

frechett@spot.Colorado.EDU (-=Runaway Daemon=-) (05/24/91)

I have tried uname -a and 
adb -k /vmunix /dev/mem   on my ULTRIX which is either 4.0 or 4.1  (Something
I haven't been able to verify obviously)  I believe it to be 4.0 as 
our machine running 4.1 has the uname command.  
The one I am having a problem with doesn't have uname(1) or adb(anything).
Anything else?

	ian

-=Runaway Daemon=-

mckeehan@math.utk.edu (05/24/91)

>|> >Try "uname -a".  You should get the version, release, and several
>|> >other tidbits.  Take a look at the man page for uname for more
>|> >details (and to make sure your system has a uname command).  Enjoy!
>|>
>|> This works on an SG but not on Ultrix or SunOS.
>     
>It does work in SunOS 4.1.1 on a Sun4 (but not in SunOS 4.0.3 on a Sun3).
>  
It also works in SunOS 4.1.1 on a Sun3

William McKeehan

larvi@ida.liu.se (Lars Viklund) (05/24/91)

In article <1991May23.154837.17537@linus.mitre.org> kepowers@mbunix.mitre.org (Powers) writes:
>>Try "uname -a".  You should get the version, release, and several
>>other tidbits.  Take a look at the man page for uname for more
>>details (and to make sure your system has a uname command).  Enjoy!
>
>This works on an SG but not on Ultrix or SunOS.
>
uname(1) exists in SunOS 4.1.1, but not in 4.0.3. I'm nor sure about 4.1.

--
Lars Viklund                                       | Email: lvi@ida.liu.se
Programming Environments Laboratory                | Phone: +46 13282689
Department of Computer and Information Science     | Fax  : +46 13282666
Linkoping University, S-581 83  LINKOPING, SWEDEN  | Telex: 8155076 LiUIDA S

root@oakhill.sps.mot.com (Operator) (05/24/91)

In article <1991May23.154837.17537@linus.mitre.org> kepowers@mbunix.mitre.org (Powers) writes:
>>
>>Try "uname -a"... 
>>
>
>Kelly-Erin Powers writes:
>
>This works on an SG but not on Ultrix or SunOS.
>                                         ^^^^^^

Works for me (SunOS 4.1, Sun3/280 ; /bin/uname).


       "As for me and my house, we will serve the Lord."
                                          Joshua 24:15
/**************************************************************
*       Vance R. Fields III   |   Motorola SPS                *
*                           -----                             *
*      System Administrator   |   Austin, TX 78735            * 
*                             |                               *
**************************************************************/

sergio@ingres.com (Sergio L Aponte) (05/25/91)

	Sun OS? Sure...

	------------------------------------------
	coqui{sergio}70: uname -a
	SunOS coqui 4.1.1 1 sun4c
	coqui{sergio}71:
	------------------------------------------
--
===============================================================   _|||_
Sergio L. Aponte, MTS @ ASK Computer, Ingres Product Division     <*,*>
Internet : sergio@coqui.ingres.com                                [`-']  Keko
UUCP     : {sun,mtxinu,pyramid,pacbell}!ingres!coqui!sergio       _"_"_  Jones

mouse@thunder.mcrcim.mcgill.edu (der Mouse) (05/25/91)

In article <tmurphy.675017160@convex.convex.com>, tmurphy@convex.com (Tom Murphy) writes:

> This works for Ultrix, and ConvexOS :

> Ultrix :

> VAX> adb -k /vmunix /dev/mem
> sbr 80090f18 slr 8b6a
> p0br 80c5ae00 p0lr 12e p1br 8045c200 p1lr 1fffea
> version/s
> _version:
> _version:       Ultrix-32 V3.0 (Rev 66) UWS V2.0 (BL 10.0) System #2: Mon Jan 14
>  16:21:22 CST 1991

Or, if you don't happen to have read access to /dev/mem (which means
the above won't work), you can

adb /vmunix
_version?S

and while it's true that that can be inaccurate (it gives the version
string from /vmunix, not from the running kernel), it is unlikely to be
inaccurate on a system in multi-user mode that isn't just about to be
rebooted.

I would hope something similar is true of the Convex, but have no
experience with them to base out-and-out statements on.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu

barmar@think.com (Barry Margolin) (05/26/91)

In article <1991May24.163048.4493@ida.liu.se> larvi@ida.liu.se (Lars Viklund) writes:
>uname(1) exists in SunOS 4.1.1, but not in 4.0.3. I'm nor sure about 4.1.

I believe it exists in 4.0.3, but it's in /5bin rather than /bin.
-- 
Barry Margolin, Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar

dik@cwi.nl (Dik T. Winter) (05/26/91)

In article <1991May26.030122.20964@Think.COM> barmar@think.com writes:
 > In article <1991May24.163048.4493@ida.liu.se> larvi@ida.liu.se (Lars Viklund) writes:
 > >uname(1) exists in SunOS 4.1.1, but not in 4.0.3. I'm nor sure about 4.1.
 > 
 > I believe it exists in 4.0.3, but it's in /5bin rather than /bin.
 > -- 
I found this sequence of responses amusing.  The question was (see Subject).
And to use uname to do it you have to know the version first.
My response to the original question is: there is not easy portable way
to do it.
--
dik t. winter, cwi, amsterdam, nederland
dik@cwi.nl

guy@auspex.auspex.com (Guy Harris) (05/27/91)

>... and as my MKS toolkit manual notes uname comes to us
>from the AT&T flavor of UNIX (which makes SunOS a bit of a mystery -- I
>thought it was really AT&Sun but I don't have a Sun handy).

Why does it make it a bit of a mystery?  Different versions of SunOS
have different bits of S5 in them; some don't have "uname", some have it
in "/usr/5bin", and some have it in "/usr/bin".  It may also be, in
those versions of SunOS that have it, part of the "System V" optional
software category, which means you don't have it unless you install that
software category.

guy@auspex.auspex.com (Guy Harris) (05/27/91)

>It does work in SunOS 4.1.1 on a Sun4 (but not in SunOS 4.0.3 on a Sun3).

It's nothing to do with Sun-3 vs. Sun-4; it's a question of pre-4.1 vs.
4.1[.x].  Systems prior to 3.2 didn't have "uname" at all; 3.2 through
4.0[.x] had it in "/usr/5bin", and 1) don't report the exact release
number and 2) don't give the version number at all; 4.1 actually gets it
from a structure generated during the kernel build, and should give the
right release number and should give the number that shows up in
"/etc/motd" in:

	SunOS Release 4.0.3c (FDDI_ALM_M) #1: Wed Nov 21 14:15:21 PST 1990
					   ^

as the version number.

gwyn@smoke.brl.mil (Doug Gwyn) (05/27/91)

In article <1991May24.163048.4493@ida.liu.se> larvi@ida.liu.se (Lars Viklund) writes:
>uname(1) exists in SunOS 4.1.1, but not in 4.0.3. I'm nor sure about 4.1.

It certainly does exist on all versions of SunOS that I've ever used.
You may have to install the "optional" System V software package when
you configure your system, and perhaps need to include /usr/5bin in
your command search path.  On my SunOS 4.0.3 system that's where it is.

gwyn@smoke.brl.mil (Doug Gwyn) (05/27/91)

In article <3592@charon.cwi.nl> dik@cwi.nl (Dik T. Winter) writes:
>And to use uname to do it you have to know the version first.

No, in fact on the half-a-zillion UNIX systems on which I have accounts,
I can type "uname -a" on all of them and get the version information.
That's because when I log in I set up my PATH environment variable to
include ALL the potential system software directories, not just /bin.

hugh_davies.wgc1@rx.xerox.com (05/28/91)

<...>Try "uname -a".  You should get the version, release, and several
>other tidbits.  Take a look at the man page for uname for more
>details (and to make sure your system has a uname command).  Enjoy!

This works on an SG but not on Ultrix or SunOS....>

Really?

kzin{hdavies}9: uname -a
SunOS kzin 4.1 2 
kzin{hdavies}10: 

Hugh.
------------------------------------------------------
"But far numerous was the Herd of such,
Who think too little, and talk too much."
	John Dryden (1631-1700). British poet and dramatist.

btaplin@silver.ucs.indiana.edu (bradley taplin) (05/28/91)

Some versions of ULTRIX might fail here, but on ours
"uname -a" responds with "ULTRIX silver 4.1 0 VAX"
so maybe it depends on the shell? I run /bin/tcsh.

--
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 btaplin@silver.ucs.indiana.edu craves Bay Area work. Religion BA.
 Experience: IU Computing Services (hardware maint) since Sept 90. 
 Knowledge: DOS, UNIX, NeXT, VMS; Emacs, tsch, WP, 123, dB3+, TeX.
 Learning: C++, networks, formal logic. Please e-mail suggestions.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

bc@uxa.cso.uiuc.edu (Ben Cox) (05/30/91)

larvi@ida.liu.se (Lars Viklund) writes:

>uname(1) exists in SunOS 4.1.1, but not in 4.0.3. I'm nor sure about 4.1.

Yes it does.

davisson@IDA.ORG (Chuck Davisson) (05/31/91)

From article <1991May22.163628.12135@njitgw.njit.edu>, by madhua@mars.njit.edu (madhu aiyappen ):
> 
> The subject says it - what is the command to find
> the Version and Release of UNIX Operating System
> (other than finding it in /etc/motd)?
> 
> Any simple commands? Thanks for any help.

I have it working on a Sun 3 with SunOS 4.1.1, a Sun3 with SunOS 4.1 and
a Sun3 with SunOS 4.0.3.  On the 4.0.3 system the -v option doesn't pick
up the ".3" in 4.0.3.  Also on the 4.0.3 system, uname is part of the
optional System V stuff in /usr/5bin.  

perl@dwrsun2.UUCP (Robert Perlberg) (06/21/91)

In article <1991May30.034145.21821@ux1.cso.uiuc.edu>, bc@uxa.cso.uiuc.edu (Ben Cox) writes:
> larvi@ida.liu.se (Lars Viklund) writes:
> 
> >uname(1) exists in SunOS 4.1.1, but not in 4.0.3. I'm nor sure about 4.1.

In pre-4.1.1 versions of SunOS it's in /usr/5bin, so you have to
install the System V utilities to get it.

Robert Perlberg
Dean Witter Reynolds Inc., New York
murphy!dwrsun2!perl
	-- "I am not a language ... I am a free man!"

srvarma@sodium.att.com (16AW20000[ehs]-Sandeep Varma(HO0000)T100) (06/25/91)

In article <2336@prodigal.dwrsun2.UUCP> perl@dwrsun2.UUCP (Robert Perlberg) writes:
>
>In pre-4.1.1 versions of SunOS it's in /usr/5bin, so you have to
>install the System V utilities to get it.
>
How about the following options, without having to install Sys5 stuff:

1. Reading from /etc/motd. Normally, system administrators put the version info
in that file.

2. Via "/etc/dmesg" command. Generally, this also gives you info about version
number and a lot of other interesting stuff.

3. If 1 and 2 fail, you should be able to do a cat on "etc/install/release" to
get version number of SunOS. 

Hope this helps.

- Sandeep.

-- 
Sandeep Varma			Internet: srvarma@sodium.att.com
AT&T Bell Labs 			UUCP:	  uunet!att!sodium!srvarma
Lincroft, NJ 07738		Voice:	  (908)842-3866 (H)/(908)576-4225 (W)
"Live Unix OR Die!"		[My company has nothing to do with the above.]