Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

uname(3) [osx man page]

UNAME(3)						   BSD Library Functions Manual 						  UNAME(3)

uname -- get system identification LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/utsname.h> int uname(struct utsname *name); DESCRIPTION
The uname() function stores nul-terminated strings of information identifying the current system into the structure referenced by name. The utsname structure is defined in the <sys/utsname.h> header file, and contains the following members: sysname Name of the operating system implementation. nodename Network name of this machine. release Release level of the operating system. version Version level of the operating system. machine Machine hardware platform. RETURN VALUES
The uname() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
The uname() function may fail and set errno for any of the errors specified for the library functions sysctl(3). SEE ALSO
uname(1), sysctl(3) STANDARDS
The uname() function conforms to IEEE Std 1003.1-1988 (``POSIX.1''). HISTORY
The uname() function first appeared in 4.4BSD. BSD
January 4, 1994 BSD

Check Out this Related Man Page

uname(2)							   System Calls 							  uname(2)

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 fur- ther identify the operating system. The machine member contains a standard name that identifies the hardware on which the operating system 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.11 21 Jul 1999 uname(2)
Man Page

15 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

OS Type and Version

I have seen quite a few posts recently which have launched into questions about specfic errors whose resolution depends a lot upon the OS type and version. I suggest that in the FAQ an additional entry be included, either under general board usage or posting threads, that informs the user to... (6 Replies)
Discussion started by: saabir
6 Replies

2. UNIX for Dummies Questions & Answers


Hello All is there something on this earth,something when i tybe (uname) it types for me (UNIX)? Regards (4 Replies)
Discussion started by: qmemo
4 Replies

3. AIX

aix swap

I have an unsupported legacy server: # uname -a AIX ibmms01 3 4 0054960A4C00 Following a period of poor performance, it was investigated using vmstat 10. There upto 10 blocked kernel threads reported, and free memory was down to 123. The scan rate was high, 3000+ with lots of page in page... (6 Replies)
Discussion started by: jabberwocky
6 Replies

4. Shell Programming and Scripting

How to Change Uname output?

I want replace 2.6.15-25-server with 2.6.17 ? $uname -r 2.6.15-25-server 1) mv /bin/uname /bin/uname.orig 2) put the following in the new /bin/uname: #!/bin/sh echo Uname (New Version) /bin/uname.orig :confused: (3 Replies)
Discussion started by: pop_black
3 Replies

5. UNIX for Dummies Questions & Answers

Operating system details

How to get operating system details of a Unix box. I want to know if an OS is a 32 bit Os or a 64 bit OS. uname -aX does not provide this detail. Thanks, Rahul. (4 Replies)
Discussion started by: rahulrathod
4 Replies

6. UNIX for Dummies Questions & Answers

Wrong 'uname' )

Hi ! I heard that root can modify the uname -command, so it will show the wrong kernel version. Is it true? can you tell more about this /give links ? system: linux/*bsd. thanks in advance (14 Replies)
Discussion started by: DCrystal
14 Replies

7. Shell Programming and Scripting

ipaddress in HP-UX

Hi, How can I figure out the IP address of my node in HP-UX? Here is uname -a: /throra10 >uname -a HP-UX finprod B.11.23 U ia64 3832216299 unlimited-user license This is to launch Xterminal. Thanks. (7 Replies)
Discussion started by: RockyC123
7 Replies

8. Shell Programming and Scripting

How to Change Uname output?

I want use fake uname anyone can guide? (9 Replies)
Discussion started by: redstaing
9 Replies

9. UNIX for Advanced & Expert Users

uname info

Hi all, on my linux i typed uname -a which gave me Linux 2.6.13-1.1526_FC4smp #1 SMP Wed Sep 28 19:30:04 EDT 2005 i686 i686 i386 GNU/Linux I was checking kernel version i also didnt know what linux i have... So if i undersood this correctly , i have fedora core 4 ? Also ,... (3 Replies)
Discussion started by: ttoni
3 Replies

10. AIX

uname -S newhostname

hi freinds recently i have change hostname node as using uname -s ******* but next time i saw the name using uname -n the name did t changed is that i have to reboot the system (4 Replies)
Discussion started by: senmak
4 Replies

11. UNIX for Advanced & Expert Users

tr command with uname -n

Using the command : echo $eup_terminal_code | tr -s 'mil vrn qcm' 'mci pql qcm' it works,but this translation changes depending on the system. I'd like to define the following variables ,one for each system : mil22h_from='mil vrn frl' mil22h_to='mci vci fci' ... (4 Replies)
Discussion started by: Pierluigi.sala
4 Replies

12. Fedora

uname too vague?

Hi all, I am ssh'ed into a cluster and want to install a package. However, I don't know which type to chose (CentOS, Fedora, OpenSuSE are some of the options). I ran called uname with various arguments but none are specific... $ uname -n resolute.research... $ uname -i x86_64 $ uname... (6 Replies)
Discussion started by: neurorad
6 Replies

13. UNIX for Dummies Questions & Answers

uname -a output

Can anyone please let me know the meaning of output of uname -a ? I am totally new to unix or linux and just thinking to start learning. When I run uname -a the output I get is - "Linux blx28ap01 2.6.18-238.12.1.el5 #1 SMP Sat May 7 20:18:50 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux" I want to... (7 Replies)
Discussion started by: csrohit
7 Replies

14. UNIX for Dummies Questions & Answers

Linux version of aix 'uname'

Hello all, Does linux have a command which performs a similar function to aix uname -a Thanks (3 Replies)
Discussion started by: Grueben
3 Replies

15. Shell Programming and Scripting

Perl command modification

below is a snippet of code from a larger perl code: my $uname = ( -e '/usr/bin/uname' ) ? '/usr/bin/uname' : '/bin/uname'; my $os = ( `$uname 2>/dev/null` ); when i run this code, it seems to be complaining about the backticks. is there any efficient way i can get rid of the backticks... (3 Replies)
Discussion started by: SkySmart
3 Replies

Featured Tech Videos