.\" -*- coding: UTF-8 -*- .\" Copyright (c) 1993 Michael Haardt (michael@moria.de), .\" Fri Apr 2 11:32:09 MET DST 1993 .\" and Andries Brouwer (aeb@cwi.nl), Fri Feb 14 21:47:50 1997. .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" .\" Modified Sun Jul 25 10:45:30 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Sun Jul 21 21:25:26 1996 by Andries Brouwer (aeb@cwi.nl) .\" Modified Mon Oct 21 17:47:19 1996 by Eric S. Raymond (esr@thyrsus.com) .\" Modified Wed Aug 27 20:28:58 1997 by Nicolás Lichtmaier (nick@debian.org) .\" Modified Mon Sep 21 00:00:26 1998 by Andries Brouwer (aeb@cwi.nl) .\" Modified Wed Jan 24 06:37:24 2001 by Eric S. Raymond (esr@thyrsus.com) .\" Modified Thu Dec 13 23:53:27 2001 by Martin Schulze .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH environ 7 "5 febbraio 2023" "Linux man\-pages 6.05.01" .SH NOME environ \- ambiente dell'utente .SH SINTASSI .nf \fBextern char **\fP\fIenviron\fP\fB;\fP .fi .SH DESCRIZIONE La variabile \fIenviron\fP si riferisce a un array di puntatori a stringhe chiamato l'«ambiente». L'ultimo puntatore di questo array ha valore NULL. Questo array di stringhe è reso disponibile al processo dalla chiamata di sistema \fBexecve\fP(2) quando viene eseguito un nuovo programmaQuando viene creato un processo figlio tramite \fBfork\fP(2), esso eredita una \fIcopia\fP dell'ambiente del suo genitore. .PP By convention, the strings in \fIenviron\fP have the form "\fIname\fP\fB=\fP\fIvalue\fP". The name is case\-sensitive and may not contain the character "\fB=\fP". The value can be anything that can be represented as a string. The name and the value may not contain an embedded null byte (\[aq]\e0\[aq]), since this is assumed to terminate the string. .PP Le variabili d'ambiente possono essere messe nell'ambiente di shell dal comando \fIexport\fP e da `"nome=valore" in \fBsh\fP(1), o dal comando \fIsetenv\fP se si usa \fBcsh\fP(1). .PP L'ambiente iniziale della shell è riempito in diversi modi, tra i quali le definizioni contenute in \fI/etc/environment\fP che sono elaborate da \fBpam_env\fP(8) per tutti gi utenti al momento del login (su sistemi che impiegano \fBpam\fP(8)). In aggiunta, vari script di inizializzazione della shell, come lo script a livello globale \fI/etc/profile\fP e lo script delle inizializzazioni per utente possono includere comandi che aggiungolo variabili all'ambiente della shell; per i dettagli vedere la pagina di manuale della shell preferita. .PP Le shell in stile Bourne riconoscono la sintassi .PP .in +4n .EX NAME=value command .EE .in .PP per creare una definizione di variabile d'ambiente solo nell'ambito del processo che esegue \fIcomando\fP. Più definizioni di variabile, separate da spazi bianchi, possono precedere \fIcomando\fP. .PP Argomenti posso essere messi nell'ambiente come parametro di un \fBexec\fP(3). Un programma in C può modificare il suo ambiente usando le funzioni \fBgetenv\fP(3), \fBputenv\fP(3), \fBsetenv\fP(3) e \fBunsetenv\fP(3). .PP What follows is a list of environment variables typically seen on a system. This list is incomplete and includes only common variables seen by average users in their day\-to\-day routine. Environment variables specific to a particular program or library function are documented in the ENVIRONMENT section of the appropriate manual page. .TP \fBUSER\fP Il nome dell'utente collegato (usato da programmi derivati da BSD). Impostato al momento del login, vedi NOTE più avanti. .TP \fBLOGNAME\fP Il nome dell'utente collegato (usato da programmi derivati da System V). Impostato al momento del login, vedi NOTE più avanti. .TP \fBHOME\fP La directory di login dell'utente. Impostata al momento del login, vedi NOTE più avanti. .TP \fBLANG\fP Il nome della localizzazione da usare per le categorie di localizzazione quando non siano specificate altrimenti da \fBLC_ALL\fP o da variabili d'ambiente più specifiche come \fBLC_COLLATE\fP, \fBLC_CTYPE\fP, \fBLC_MESSAGES\fP, \fBLC_MONETARY\fP, \fBLC_NUMERIC\fP e \fBLC_TIME\fP (vedi \fBlocale\fP(7) per ulteriori dettagli sulle variabili d'ambiente \fBLC_*\fP). .TP \fBPATH\fP The sequence of directory prefixes that \fBsh\fP(1) and many other programs employ when searching for an executable file that is specified as a simple filename (i.a., a pathname that contains no slashes). The prefixes are separated by colons (\fB:\fP). The list of prefixes is searched from beginning to end, by checking the pathname formed by concatenating a prefix, a slash, and the filename, until a file with execute permission is found. .IP As a legacy feature, a zero\-length prefix (specified as two adjacent colons, or an initial or terminating colon) is interpreted to mean the current working directory. However, use of this feature is deprecated, and POSIX notes that a conforming application shall use an explicit pathname (e.g., \&\fI.\fP) to specify the current working directory. .IP Analogamente a \fBPATH\fP, \fBCDPATH\fP è usato da alcune shell per trovare la destinazione di un cambio di directory, \fBMANPATH\fP è usato da \fBman\fP(1) per trovare pagine di manuale, e così via). .TP \fBPWD\fP Absolute path to the current working directory; required to be partially canonical (no \fI.\&\fP or \fI..\&\fP components). .TP \fBSHELL\fP The absolute pathname of the user's login shell. Set at login time, see section NOTES below. .TP \fBTERM\fP Il tipo di terminale per il quale deve essere preparato l'output. .TP \fBPAGER\fP The user's preferred utility to display text files. Any string acceptable as a command\-string operand to the \fIsh\ \-c\fP command shall be valid. If \fBPAGER\fP is null or is not set, then applications that launch a pager will default to a program such as \fBless\fP(1) or \fBmore\fP(1). .TP \fBEDITOR\fP/\fBVISUAL\fP .\" .TP .\" .B BROWSER .\" The user's preferred utility to browse URLs. Sequence of colon-separated .\" browser commands. See http://www.catb.org/\[ti]esr/BROWSER/ . The user's preferred utility to edit text files. Any string acceptable as a command_string operand to the \fIsh\ \-c\fP command shall be valid. .PP Si noti che il comportamento di molti programmi e routine delle librerie è influenzato dalla presenza o dal valore di alcune variabili d'ambiente. Gli esempi comprendono: .IP \[bu] 3 Le variabili \fBLANG\fP, \fBLANGUAGE\fP, \fBNLSPATH\fP, \fBLOCPATH\fP, \fBLC_ALL\fP, \fBLC_MESSAGES\fP eccetera, influenzano l'uso delle localizzazioni; si veda \fBcatopen\fP(3), \fBgettext\fP(3) e \fBlocale\fP(7). .IP \[bu] \fBTMPDIR\fP influenza il prefisso del percorso di nomi creati da \fBtempnam\fP(3) e altre routine, e la directory temporanea usata da \fBsort\fP(1) e da altri programmi. .IP \[bu] \fBLD_LIBRARY_PATH\fP, \fBLD_PRELOAD\fP e altre variabili \fBLD_*\fP influenzano il comportamento del loader/linker dinamico. Si veda anche \fBld.so\fP(8). .IP \[bu] \fBPOSIXLY_CORRECT\fP fa seguire ad alcuni programmi e routine di libreria le norme POSIX. .IP \[bu] Il comportamento di \fBmalloc\fP(3) è influenzato dalle variabili \fBMALLOC_*\fP. .IP \[bu] La variabile \fBHOSTALIASES\fP dà il nome di un file contenente degli alias da usare con \fBgethostbyname\fP(3). .IP \[bu] \fBTZ\fP e \fBTZDIR\fP dà informazioni sulla zona di fuso orario utilizzata da \fBtzset\fP(3) e, attraverso questa, da funzioni come \fBctime\fP(3), \fBlocaltime\fP(3), \fBmktime\fP(3), \fBstrftime\fP(3). Vedere anche \fBtzselect\fP(8). .IP \[bu] \fBTERMCAP\fP dà informazioni su come indirizzare un dato terminale (o dà il nome di un file contenente tali informazioni). .IP \[bu] \fBCOLUMNS\fP e \fBLINES\fP informa le applicazioni sulla dimensione della finestra, forse sovrascrivendo la dimensione attuale. .IP \[bu] \fBPRINTER\fP o \fBLPDEST\fP può specificare la stampante che si desidera usare. Vedere \fBlpr\fP(1). .SH NOTE Historically and by standard, \fIenviron\fP must be declared in the user program. However, as a (nonstandard) programmer convenience, \fIenviron\fP is declared in the header file \fI\fP if the \fB_GNU_SOURCE\fP feature test macro is defined (see \fBfeature_test_macros\fP(7)). .PP Le operazioni \fBPR_SET_MM_ENV_START\fP e \fBPR_SET_MM_ENV_END\fP di \fBprctl\fP(2) possono essere usate per controllare la posizione dell'ambiente dei processi. .PP The \fBHOME\fP, \fBLOGNAME\fP, \fBSHELL\fP, and \fBUSER\fP variables are set when the user is changed via a session management interface, typically by a program such as \fBlogin\fP(1) from a user database (such as \fBpasswd\fP(5)). (Switching to the root user using \fBsu\fP(1) may result in a mixed environment where \fBLOGNAME\fP and \fBUSER\fP are retained from old user; see the \fBsu\fP(1) manual page.) .SH BUG Qui c'è chiaramente un rischio di sicurezza. Molti comandi di sistema sono stati indotti a fare danni da un utente che specificava valori insoliti per \fBIFS\fP o \fBLD_LIBRARY_PATH\fP. .PP C'è anche il rischio di un inquinamento dello spazio nome. Programmi come \fImake\fP e \fIautoconf\fP permettono la sovrascrittura dei nomi delle utility di default dall'ambiente con variabili dal nome simile cambiato in maiuscole/minuscole. In questo modo esse usano \fBCC\fP per selezionare il compilatore C desiderato (e similarmente \fBMAKE\fP, \fBAR\fP, \fBAS\fP, \fBFC\fP, \fBLD\fP, \fBLEX\fP, \fBRM\fP, \fBYACC\fP, etc.). Tuttavia in alcuni usi tradizionali tale variabile d'ambiente dà opzioni al programma invece di un nome di percorso. In questo modo uno ha \fBMORE\fP e \fBLESS\fP. Tale uso è considerato scorretto, e deve essere evitato nei nuovi programmi. .SH "VEDERE ANCHE" \fBbash\fP(1), \fBcsh\fP(1), \fBenv\fP(1), \fBlogin\fP(1), \fBprintenv\fP(1), \fBsh\fP(1), \fBsu\fP(1), \fBtcsh\fP(1), \fBexecve\fP(2), \fBclearenv\fP(3), \fBexec\fP(3), \fBgetenv\fP(3), \fBputenv\fP(3), \fBsetenv\fP(3), \fBunsetenv\fP(3), \fBlocale\fP(7), \fBld.so\fP(8), \fBpam_env\fP(8) .PP .SH TRADUZIONE La traduzione italiana di questa pagina di manuale è stata creata da Giovanni Bortolozzo , Alessandro Rubini , Ottavio G. Rizzo , 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 .