.\" -*- 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 "30 marzo 2023" "Linux man\-pages 6.05.01" .SH NOME uname \- restituisce nome e informazioni sul kernel attuale .SH LIBRARY Standard C library (\fIlibc\fP, \fI\-lc\fP) .SH SINTASSI .nf \fB#include \fP .PP \fBint uname(struct utsname *\fP\fIbuf\fP\fB);\fP .fi .SH DESCRIZIONE \fBuname\fP() restituisce informazioni sul sistema attraverso il puntatore \fIbuf\fP. La struttura \fIutsname\fP è definita in \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 La lunghezza degli array in una \fIstruttura utsname\fP non è specificata (vedere NOTE); i campi sono terminati con un byte nullo (\[aq]\e0\[aq]). .SH "VALORE RESTITUITO" In caso di successo restituisce zero. In caso di errore restituisce \-1, e \fIerrno\fP verrà impostato per indicare l'errore. .SH ERRORI .TP \fBEFAULT\fP \fIbuf\fPnon è valido. .SH VERSIONI Il membro \fIdomainname\fP (il nome di dominio NIS o YP) è un'estensione GNU. .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. .SH STANDARDS POSIX.1\-2008. .SH STORIA POSIX.1\-2001, SVr4, 4.4BSD. .SS "Differenze tra la libreria C e il kernel" .\" That was back before Linux 1.0 .\" That was also back before Linux 1.0 Col tempo, aumenti nella dimensione della struttura \fIutsname\fP hanno portato a tre versioni successive di \fBuname\fP(): \fIsys_olduname\fP() (slot \fI__NR_oldolduname\fP), \fIsys_uname\fP() (slot \fI__NR_olduname\fP), e \fIsys_newuname\fP() (slot \fI__NR_uname\fP). La prima usava la lunghezza 9 per tutti i campi; la seconda usava 65; anche la terza usava 65, aggiungendo però il campo \fIdomainname\fP. La funzione wrapper di glibc, \fBuname \fP(), nasconde questi dettagli alle applicazioni, invocando la versione più recente della chiamata di sistema fornita dal kernel. .SH NOTE 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 Parte dell'informazione utsname è anche accessibile attraverso \fI/proc/sys/kernel/\fP{\fIostype\fP, \fIhostname\fP, \fIosrelease\fP, \fIversion\fP, \fIdomainname\fP}. .SH "VEDERE ANCHE" \fBuname\fP(1), \fBgetdomainname\fP(2), \fBgethostname\fP(2), \fButs_namespaces\fP(7) .PP .SH TRADUZIONE La traduzione italiana di questa pagina di manuale è stata creata da Goffredo Baroncelli , Giulio Daprelà , Elisabetta Galli e Marco Curreli . .PP Questa traduzione è documentazione libera; leggere la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Versione 3 .UE o successiva per le condizioni di copyright. Non ci assumiamo alcuna responsabilità. .PP Per segnalare errori nella traduzione di questa pagina di manuale inviare un messaggio a .MT pluto-ildp@lists.pluto.it .ME .