IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

uname (2)

UNAME(2)                   Linux Programmer's Manual                  UNAME(2)



NAME
       uname - get name and information about current kernel

SYNOPSIS
       #include<sys/utsname.h>

       intuname(structutsname*buf);

DESCRIPTION
       uname  returns  system  information in the structure pointed to by buf.
       The utsname struct is defined in <sys/utsname.h>:
              struct utsname {
                      char sysname[];
                      char nodename[];
                      char release[];
                      char version[];
                      char machine[];
              #ifdef _GNU_SOURCE
                      char domainname[];
              #endif
              };
       The length of the arrays in a struct utsname is unspecified; the fields
       are NUL-terminated.

RETURNVALUE
       On  success,  zero is returned.  On error, -1 is returned, and errno is
       set appropriately.

ERRORS
       EFAULT buf is not valid.

CONFORMINGTO
       SVr4, SVID, POSIX, X/OPEN.  There is no uname call in BSD 4.3.

       The domainname member (the NIS or YP domain name) is a GNU extension.

NOTES
       This is a system call, and the operating system  presumably  knows  its
       name, release and version. It also knows what hardware it runs on.  So,
       four of the fields of the struct are meaningful.  On  the  other  hand,
       the  field  nodename  is  meaningless: it gives the name of the present
       machine in some undefined network, but typically machines are  in  more
       than  one  network  and have several names. Moreover, the kernel has no
       way of knowing about such things, so it has to be told what  to  answer
       here.  The same holds for the additional domainname field.

       To  this  end Linux uses the system calls sethostname(2) and setdomain-
       name(2).  Note that there is no standard that says  that  the  hostname
       set  by  sethostname(2) is the same string as the nodename field of the
       struct returned by uname (indeed, some systems allow a  256-byte  host-
       name and an 8-byte nodename), but this is true on Linux. The same holds
       for setdomainname(2) and the domainname field.

       The length of the fields in the struct varies. Some  operating  systems
       or  libraries  use  a hardcoded 9 or 33 or 65 or 257. Other systems use
       SYS_NMLN or _SYS_NMLN or UTSLEN or _UTSNAME_LENGTH. Clearly,  it  is  a
       bad  idea  to use any of these constants - just use sizeof(...).  Often
       257 is chosen in order to have room for an internet hostname.

       There have been three Linux system calls uname(). The  first  one  used
       length  9,  the second one used 65, the third one also uses 65 but adds
       the domainname field.

       Part of the utsname information is also accessible via sysctl  and  via
       /proc/sys/kernel/{ostype, hostname, osrelease, version, domainname}.

SEEALSO
       uname(1), getdomainname(2), gethostname(2)



Linux 2.5.0                       2001-12-15                          UNAME(2)

_Exitgetsockoptoutwshmat
_exitgettidoutw_pshmctl
_llseekgettimeofdaypauseshmdt
_newselectgetuidpersonalityshmget
_sysctlgttypipeshmop
acceptidlepivot_rootshutdown
accessinbpollsigaction
acctinb_pprctlsigaltstack
adjtimexinlpreadsigblock
afs_syscallinl_pprofsiggetmask
alarminsbpselectsigmask
alloc_hugepagesinslptracesignal
arch_prctlinswpwritesigpause
bdflushintroquotactlsigpending
bindinwreadsigprocmask
breakinw_preaddirsigqueue
brkioctlreadlinksigreturn
cacheflushioctl_listreadvsigsetmask
capgetiopermrebootsigsuspend
capsetioplrecvsigtimedwait
chdiripcrecvfromsigvec
chmodkillrecvmsgsigwaitinfo
chownkillpgrenamesocket
chrootlchownrmdirsocketcall
clonelinksbrksocketpair
closelistensched_get_priority_maxssetmask
connectllseeksched_get_priority_minstat
creatlocksched_getaffinitystatfs
duplseeksched_getparamstime
dup2lstatsched_getschedulerstty
execvemadvisesched_rr_get_intervalswapoff
exitmincoresched_setaffinityswapon
fchdirmkdirsched_setparamsymlink
fchmodmknodsched_setschedulersync
fchownmlocksched_yieldsyscall
fcntlmlockallselectsyscalls
fdatasyncmmapselect_tutsysctl
flockmmap2semctlsysfs
forkmodify_ldtsemgetsysinfo
free_hugepagesmountsemopsyslog
fstatmprotectsendtime
fstatfsmpxsendfiletimes
fsyncmremapsendmsgtkill
ftruncatemsgctlsendtotruncate
futexmsggetsetcontextumask
getcontextmsgopsetdomainnameumount
getdentsmsgrcvsetegidumount2
getdomainnamemsgsndseteuiduname
getdtablesizemsyncsetfsgidundocumented
getegidmunlocksetfsuidunimplemented
geteuidmunlockallsetgidunlink
getgidmunmapsetgroupsuselib
getgroupsnanosleepsethostidustat
gethostidnfsservctlsethostnameutime
gethostnamenicesetitimerutimes
getitimerobsoletesetpgidvfork
getpagesizeoldfstatsetpgrpvhangup
getpeernameoldlstatsetpriorityvm86
getpgidoldoldunamesetregidwait
getpgrpoldstatsetresgidwait3
getpidoldunamesetresuidwait4
getppidopensetreuidwaitpid
getpriorityoutbsetrlimitwrite
getresgidoutb_psetsidwritev
getresuidoutlsetsockopt 
getrlimitoutl_psettimeofday 
getrusageoutsbsetuid 
getsidoutslsetup 


My Money 2.0.49
Personal financial software
Linux Kernel 2.6 2.6.32-rc8
Linux Kernel
GCstar 1.5.0
Personal collections manager
ImageMagick 6.5.7.9
ImageMagick image processing studio
BibleTime 2.4
Bible study software for Linux / KDE
PHP 5.3.1
Server-side, cross-platform, HTML embedded scripting language.
LFTP 4.0.4
Shell-like command line ftp client.
Tellico 2.1.1
Collection manager for books, music, videos, and bibliographies
Totem 2.28.4
Movie player for Gnome
GNOME 2.29.2
GNOME desktop environment
Free IT Magazines, White Papers, eBooks, and more !
Oracle Magazine

Contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more.

Vulnerability Management for Dummies

Get all the Facts and See How to Implement a Successful Vulnerability Management Program.

Website Magazine

Has tapped premier talent in the Internet industry for our content and each and every issue will contain practical advice and insights for website owners.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info