uname

Description

Uname est une commande assez classique sur les systèmes Unix car elle permet d’obtenir facilement des informations sur le système d’exploitation. On utilise souvent uname -n pour récupérer le nom du serveur. Cette commande est également souvent utilisé dans les scripts pour pouvoir adapter automatique un même script sur plusieurs serveurs.

Exemple

root@solaris:~# uname
SunOS
axel@solaris:~$ uname -n
solaris
axel@solaris:~$ uname -an
SunOS solaris 5.11 snv_151a i86pc i386 i86pc Solaris

Man solaris de la commande uname

User Commands                                            UNAME(1)

NAME
 uname - print system information

SYNOPSIS
 uname [OPTION]...

DESCRIPTION
 Print certain system information.  With no OPTION,  same  as
 -s.

 -a, --all
 print all information, in the following  order,  except
 omit -p and -i if unknown:

 -s, --kernel-name
 print the kernel name

 -n, --nodename
 print the network node hostname

 -r, --kernel-release
 print the kernel release

 -v, --kernel-version
 print the kernel version

 -m, --machine
 print the machine hardware name

 -p, --processor
 print the processor type or "unknown"

 -i, --hardware-platform
 print the hardware platform or "unknown"

 -o, --operating-system
 print the operating system

 --help
 display this help and exit

 --version
 output version information and exit

 AUTHOR
 Written by David MacKenzie.

REPORTING BUGS
 Report uname bugs to bug-coreutils@gnu.org
 GNU             coreutils             home             page:
 <http://www.gnu.org/software/coreutils/>
 General        help        using        GNU        software:

GNU coreutils 8.5    Last change: April 2010                    1

User Commands                                            UNAME(1)

 <http://www.gnu.org/gethelp/>
 Report        uname        translation        bugs        to
 <http://translationproject.org/team/>

COPYRIGHT
 Copyright O 2010 Free  Software  Foundation,  Inc.   License
 GPLv3+:      GNU      GPL     version     3     or     later
 <http://gnu.org/licenses/gpl.html>.
 This is free software: you are free to change and  redistri-
 bute  it.   There is NO WARRANTY, to the extent permitted by
 law.

SEE ALSO
 arch(1), uname(2)

 The full documentation for uname is maintained as a  Texinfo
 manual.   If  the  info  and  uname  programs  are  properly
 installed at your site, the command

 info coreutils uname invocation

 should give you access to the complete manual.

ATTRIBUTES
 See attributes(5) for descriptions of the  following  attri-
 butes:

 ___________________________________________
 |   ATTRIBUTE TYPE   |    ATTRIBUTE VALUE  |
 |____________________|_____________________|
 | Availability       |  file/gnu-coreutils |
 |____________________|_____________________|
 | Interface Stability|  Uncommitted        |
 |____________________|_____________________|
 NOTES
 Source    for    GNU    coreutils    is     available     on
 http://opensolaris.org.

GNU coreutils 8.5    Last change: April 2010                    2

Articles en relation:

  • Pas d'articles en relations
laissez un commentaire !

*