Programing

내 환경 변수는 무엇입니까?

crosscheck 2020. 9. 14. 07:58
반응형

내 환경 변수는 무엇입니까? [닫은]


bash에서 내 환경 변수를 찾고 싶습니다. 어딘가에 저장되어 있습니까?


그것이 당신이 원하는 것인지 확실하지 않지만 시도 printenv
하면 모든 환경 변수가 표시됩니다.

저장 위치 정보
Linux : 환경 변수는 어디에 저장됩니까?

쉘 환경 변수 설정 방법
http://www.codecoffee.com/tipsforlinux/articles/030.html

행복한 독서 :-)


env터미널에서 실행하십시오 .

출력 예 :

$ env
TERM=xterm
SHELL=/bin/bash
USER=joksnet
USERNAME=joksnet
DESKTOP_SESSION=gnome
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
PWD=/home/joksnet
GDM_KEYBOARD_LAYOUT=us
LANG=en_US.utf8
HOME=/home/joksnet
DISPLAY=:0.0
COLORTERM=gnome-terminal
_=/usr/bin/env

export매개 변수없이 입력 하십시오.


또는 설정 :

SET(P)                                                                  POSIX Programmer’s Manual                                                                  SET(P)

NAME
       set - set or unset options and positional parameters

SYNOPSIS
       set [-abCefmnuvx][-h][-o option][argument...]

       set [+abCefmnuvx][+h][+o option][argument...]

       set -- [argument...]

       set -o

       set +o

DESCRIPTION
       If  no  options or arguments are specified, set shall write the names and values of all shell variables in the collation sequence of the current locale. Each name
       shall start on a separate line, using the format:

              "%s=%s\n", <name>, <value>

       The value string shall be written with appropriate quoting; see the description of shell quoting in Quoting . The output shall be  suitable  for  reinput  to  the
       shell, setting or resetting, as far as possible, the variables that are currently set; read-only variables cannot be reset.

참고 URL : https://stackoverflow.com/questions/4431829/what-are-my-environment-variables

반응형