Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uname(2) — UNIX System III

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

uname(1)

UNAME(2)  —  UNIX 3.0

NAME

uname − get name of current UNIX system

SYNOPSIS

#include <sys/utsname.h>

int uname (name)
struct utsname ∗name;

DESCRIPTION

Uname stores information identifying the current UNIX system in the structure pointed to by name.

Uname uses the structure defined in <sys/utsname.h>:

struct utsname {
charsysname[9];
charnodename[9];
charrelease[9];
charversion[9];
};
extern struct utsname utsname;

Uname returns a null-terminated character string naming the current UNIX system in the character array sysname. Similarly, nodename contains the name that the system is known by on a communications network.  Release and version further identify the operating system. 

Uname will fail if name points to an invalid address.  ­[EFAULT]

RETURN VALUE

Upon successful completion, a non-negative value is returned.  Otherwise, −1 is returned and errno is set to indicate the error. 

SEE ALSO

uname(1). 

May 16, 1980

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026