Provided by: manpages-es-dev_4.15.0-9_all bug

NOMBRE

       uname - obtiene el nombre e información del núcleo actual

SINOPSIS

       #include <sys/utsname.h>

       int uname(struct utsname *buf);

DESCRIPCIÓN

       uname() devuelve información del sistema en la estructura apuntada por buf.  La estructura
       utsname se define en <sys/utsname.h>:

           struct utsname {
               char sysname[];    /* Operating system name (e.g., "Linux") */
               char nodename[];   /* Name within "some implementation-defined
                                     network" */
               char release[];    /* Operating system release
                                     (e.g., "2.6.28") */
               char version[];    /* Operating system version */
               char machine[];    /* Hardware identifier */
           #ifdef _GNU_SOURCE
               char domainname[]; /* NIS or YP domain name */
           #endif
           };

       The length of the arrays in a struct utsname is unspecified (see NOTES);  the  fields  are
       terminated by a null byte ('\0').

VALOR DEVUELTO

       On  success, zero is returned.  On error, -1 is returned, and errno is set to indicate the
       error.

ERRORES

       EFAULT buf no es válido.

CONFORME A

       POSIX.1-2001, POSIX.1-2008, SVr4.  No hay ninguna llamada uname() en 4.3BSD.

       El miembro domainname (el nombre de dominio NIS o YP) es una extensión de GNU.

NOTAS

       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.

       Para  este  propósito  Linux  utiliza   las   llamadas   al   sistema   sethostname(2)   y
       setdomainname(2).   Observe  que  no  hay  ningún  estándar que diga que el nombre de host
       establecido por sethostname(2)  sea la misma cadena que contiene el campo nodename  de  la
       estructura  devuelta por uname() (de hecho, algunos sistemas permiten un nombre de host de
       256 bytes y un nodename de 8 bytes), pero ésto es cierto en  Linux.  Lo  mismo  vale  para
       setdomainname(2)  y el campo domainname.

       La  longitud  de  los  campos  en  la  estructura  varía.  Algunos  sistemas  operativos o
       bibliotecas usan valores fijos como 9, 33, 65  o  257.  Otros  sistemas  usan  SYS_NMLN  o
       _SYS_NMLN  o  UTSLEN  o  _UTSNAME_LENGTH.  Claramente, es una mala idea usar cualquiera de
       estas constantes - tan sólo utilice sizeof(...).  A menudo se elige  257  con  el  fin  de
       tener espacio para un nombre de host en internet.

       Parte    de    la    información    de    utsname   también   puede   ser   accedida   via
       /proc/sys/kernel/{ostype, hostname, osrelease, version, domainname}.

   Diferencias kernel / biblioteca C
       Over time, increases in the size of the utsname structure have  led  to  three  successive
       versions   of   uname():   sys_olduname()   (slot  __NR_oldolduname),  sys_uname()   (slot
       __NR_olduname), and sys_newuname()  (slot __NR_uname).  The first one used  length  9  for
       all fields; the second used 65; the third also uses 65 but adds the domainname field.  The
       glibc uname()  wrapper function hides these details from applications, invoking  the  most
       recent version of the system call provided by the kernel.

VÉASE TAMBIÉN

       uname(1), getdomainname(2), gethostname(2), uts_namespaces(7)

COLOFÓN

       Esta  página es parte de la versión 5.13 del proyecto Linux man-pages. Puede encontrar una
       descripción del proyecto, información sobre cómo informar errores y la última  versión  de
       esta página en https://www.kernel.org/doc/man-pages/.

TRADUCCIÓN

       La   traducción   al  español  de  esta  página  del  manual  fue  creada  por  Urko  Lusa
       <ulusa@lacueva.ddns.org> y Miguel Pérez Ibars <mpi79470@alu.um.es>

       Esta traducción es documentación libre; lea  la  GNU  General  Public  License  Version  3
       ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩  o posterior con respecto a las condiciones de
       copyright.  No existe NINGUNA RESPONSABILIDAD.

       Si encuentra algún error en la traducción de esta  página  del  manual,  envíe  un  correo
       electrónico a ⟨debian-l10n-spanish@lists.debian.org⟩.