05-24-2005
Wouldnt uname -a work ?
Check out the man pages of uname for more info.
Vino
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm looking for a generic (i.e. would be resident in most/all unix flavors) internal command for determining my OS and version. When I telnet to a box here @ work, I get none of that info and can't remember the equivalent of the DOS ver command; I know I used to know this! Thanks. (2 Replies)
Discussion started by: brian.wilson
2 Replies
2. Solaris
Is there a way I can determine the LOM version on a Sun machine without actually shutting the system down? I'm confused. :) (2 Replies)
Discussion started by: sysera
2 Replies
3. Slackware
Apart from the obvious, uname command, is there anyway to determine which Linux distribution and version of the distribution has been installed? (7 Replies)
Discussion started by: mbb
7 Replies
4. UNIX for Dummies Questions & Answers
how can i determine which type of unix
(solaris ,AIX,HP-UX...) is installed on the machine that i am working? (2 Replies)
Discussion started by: gfhgfnhhn
2 Replies
5. Solaris
i have a program writing in PRO C which currently running in unix version 8 tie with oracle 8i, but in the future company gonna migrate this OS to version 9.
Anything i have to prepare for my PRO C program to run in unix version 9? or anything would that impact my program couldn't run well?
what... (2 Replies)
Discussion started by: lsy
2 Replies
6. UNIX for Dummies Questions & Answers
How to determine if a host is connected to the Internet in Unix ? (1 Reply)
Discussion started by: shuhang2
1 Replies
7. UNIX for Dummies Questions & Answers
How can you determine the level ot the operating system
on an HP UNIX System? (2 Replies)
Discussion started by: aschmid
2 Replies
8. Shell Programming and Scripting
I currently have a shell script that utilizes the "Date" binary - this application is slightly different on OS X (BSD General Commmand) and Linux systems (gnu date). In particular, the version on OS X requires the following to get a date 14 days in the future "date -v+14d -u +%Y-%m-%d" where gnu... (1 Reply)
Discussion started by: colinjohnson
1 Replies
9. Shell Programming and Scripting
This is an odd question and I didn't really know what category it fits. I just installed Ubuntu 12.10. During the installation process, the screen informed me that Windows 7 was installed in a particular partition.
I'm just wondering how this was accomplished. Using 'fdisk -l' will indicate... (1 Reply)
Discussion started by: jamarsh
1 Replies
10. Shell Programming and Scripting
Hello All :)
I want to write a shell script to find the file system usage on multiple UNIX servers.
Commands: df -g fsJCAPS
Below script works fine and it displays results on terminal/console. I want to store /redirect output on to local server from where I'm running the script.
... (3 Replies)
Discussion started by: Mohammad Nawaz
3 Replies
uname(2) System Calls uname(2)
NAME
uname - get name of current operating system
SYNOPSIS
#include <sys/utsname.h>
int uname(struct utsname *name);
DESCRIPTION
The uname() function stores information identifying the current operating system in the structure pointed to by name.
The uname() function uses the utsname structure, defined in <sys/utsname.h>, whose members include:
char sysname[SYS_NMLN];
char nodename[SYS_NMLN];
char release[SYS_NMLN];
char version[SYS_NMLN];
char machine[SYS_NMLN];
The uname() function returns a null-terminated character string naming the current operating system in the character array sysname. Simi-
larly, the nodename member contains the name by which the system is known on a communications network. The release and version members
further identify the operating system. The machine member contains a standard name that identifies the hardware on which the operating sys-
tem is running.
RETURN VALUES
Upon successful completion, a non-negative value is returned. Otherwise, -1 is returned and errno is set to indicate the error.
ERRORS
The uname() function will fail if:
EFAULT The name argument points to an illegal address.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
uname(1), sysinfo(2), sysconf(3C), attributes(5), standards(5)
SunOS 5.10 21 Jul 1999 uname(2)