📄 environ.7
字号:
.\" Copyright (c) 1983 Regents of the University of California..\" All rights reserved. The Berkeley software License Agreement.\" specifies the terms and conditions for redistribution..\".\" @(#)environ.7 6.1 (Berkeley) 5/20/85.\".TH ENVIRON 7 "May 20, 1985".UC 5.SH NAMEenviron \- user environment.SH SYNOPSIS.B "extern char *const *environ;".SH DESCRIPTIONAn array of strings called the `environment' is made available by.BR execve (2)when a process begins. By convention these strings have the form.RI ` name = value '.The following names are used by various commands:.TP "\w'TERMCAP 'u".B PATHThe sequence of directory prefixes that.BR sh ,.BR time ,.BR nice (1),etc., apply in searching for a file known by an incomplete path name.The prefixes are separated by `:'.Login shells set.BR PATH=:/bin:/usr/bin .Note that the empty space between the `=' and the `:' indicates the currentdirectory. Security aware people move the extra `:' to the end of theirpath or omit it..TP.B HOMEA user's login directory, set by.BR login (1)from the password file.BR passwd (5)..TP.B TERMThe kind of terminal for which output is to be prepared.This information is used by programs that wish to exploit specialterminal capabilities, a screen oriented text editor for instance.The terminal type is set by.BR login (1)from the tty database.BR ttytab (5)..TP.B SHELLThe file name of the users login shell, set by.BR login (1)from the password file.BR passwd (5)..TP.B TERMCAPThe string describing the terminal in TERM, or the name of the termcap file,see.BR termcap (5),.BR termcap (3)..TP.B EXINITA startup list of commands read by.BR elvis (1)..TP.B USERThe login name of the user, set by.BR login (1)from the password file.BR passwd (5)..TP.B LOGNAMESet to the same value as.BR USER .BSD derived systems have.BR USER ,System V has.BR LOGNAME ,so modern systems have both to avoid problems..TP.PPFurther names may be placed in the environment by the.B exportcommand and.RI ` name = value 'arguments in.BR sh (1).Arguments may also be placed in their environment byprograms if they use.BR putenv (3).Or in the environment of another program by building a new environmentfor one of the exec functions that accepts an environment list, like.BR execle (2)or.BR execve (2).It is unwise to conflict with certain .BR sh (1)variables that are frequently set and/or exported by `.profile' files:.BR MAIL ,.BR PS1 ,.BR PS2 ,.BR IFS ..SH SEE ALSO.BR elvis (1),.BR login (1),.BR sh (1),.BR execl (2),.BR execve (2),.BR system (3),.BR termcap (3),.BR termcap (5),.BR ttytab (5).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -