.\" -*- coding: UTF-8 -*- .\" Copyright (C) 2001 Andries Brouwer . .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" 2007-07-05 mtk: Added details on underlying system call interfaces .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH uname 2 "5 Febrero 2023" "Páginas de manual de Linux 6.03" .SH NOMBRE uname \- obtiene el nombre e información del núcleo actual .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP .PP \fBint uname(struct utsname *\fP\fIbuf\fP\fB);\fP .fi .SH DESCRIPCIÓN \fBuname\fP() devuelve información del sistema en la estructura apuntada por \fIbuf\fP. La estructura \fIutsname\fP se define en \fI\fP: .PP .in +4n .EX struct utsname { char sysname[]; /* Operating system name (e.g., "Linux") */ char nodename[]; /* Name within communications network to which the node is attached, if any */ char release[]; /* Operating system release (e.g., "2.6.28") */ char version[]; /* Operating system version */ char machine[]; /* Hardware type identifier */ #ifdef _GNU_SOURCE char domainname[]; /* NIS or YP domain name */ #endif }; .EE .in .PP The length of the arrays in a \fIstruct utsname\fP is unspecified (see NOTES); the fields are terminated by a null byte (\[aq]\e0\[aq]). .SH "VALOR DEVUELTO" En caso de éxito se devuelve cero. En caso de error se devuelve \-1, y \fIerrno\fP se configura para indicar el error. .SH ERRORES .TP \fBEFAULT\fP \fIbuf\fP no es válido. .SH ESTÁNDARES POSIX.1\-2001, POSIX.1\-2008, SVr4, 4.4BSD. .PP El miembro \fIdomainname\fP (el nombre de dominio NIS o YP) es una extensión de GNU. .SH NOTAS The kernel has the name, release, version, and supported machine type built in. Conversely, the \fInodename\fP field is configured by the administrator to match the network (this is what the BSD historically calls the "hostname", and is set via \fBsethostname\fP(2)). Similarly, the \fIdomainname\fP field is set via \fBsetdomainname\fP(2). .PP 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 \fBSYS_NMLN\fP or \fB_SYS_NMLN\fP or \fBUTSLEN\fP or \fB_UTSNAME_LENGTH\fP. Clearly, it is a bad idea to use any of these constants; just use sizeof(...). SVr4 uses 257, "to support Internet hostnames" \[em] this is the largest value likely to be encountered in the wild. .PP Parte de la información de utsname también puede ser accedida via \fI/proc/sys/kernel/\fP{\fIostype\fP, \fIhostname\fP, \fIosrelease\fP, \fIversion\fP, \fIdomainname\fP}. .SS "Diferencias núcleo / biblioteca C" .\" That was back before Linux 1.0 .\" That was also back before Linux 1.0 Over time, increases in the size of the \fIutsname\fP structure have led to three successive versions of \fBuname\fP(): \fIsys_olduname\fP() (slot \fI__NR_oldolduname\fP), \fIsys_uname\fP() (slot \fI__NR_olduname\fP), and \fIsys_newuname\fP() (slot \fI__NR_uname)\fP. The first one used length 9 for all fields; the second used 65; the third also uses 65 but adds the \fIdomainname\fP field. The glibc \fBuname\fP() wrapper function hides these details from applications, invoking the most recent version of the system call provided by the kernel. .SH "VÉASE TAMBIÉN" \fBuname\fP(1), \fBgetdomainname\fP(2), \fBgethostname\fP(2), \fButs_namespaces\fP(7) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Urko Lusa y Miguel Pérez Ibars . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .