
python
변수를 설정하지 않았을 때 쉘은 어디를 봐야 할지 어떻게 알 수 있나요 $PATH
?
$ env -i bash
bash-3.2$ env
PWD=/Users/cweber/projects/monorepo
SHLVL=1
_=/usr/bin/env
bash-3.2$ which python
bash-3.2$ type python
python is /usr/bin/python
bash-3.2$ python -c 'print("hello")'
hello
동일하게 적용됩니다 sh
. 차이점이 있다면 저는 MacOS를 사용하고 있습니다.