$ env | grep SHELL
SHELL=... //로그인 쉘
$ echo $0
-bash
$ ps $$
PID TTY STAT TIME COMMAND
23752 pts/0 Rs 0:00 -bash
$ ps -p $$
PID TTY TIME CMD
23752 pts/0 00:00:00 bash
$ sh
# echo $0
sh
# ps -p $$
PID TTY TIME CMD
24794 pts/0 00:00:00 sh
$ env | grep SHELL
SHELL=... //처음과 동일함. sh가 아님.
SHELL=... //로그인 쉘
$ echo $0
-bash
$ ps $$
PID TTY STAT TIME COMMAND
23752 pts/0 Rs 0:00 -bash
$ ps -p $$
PID TTY TIME CMD
23752 pts/0 00:00:00 bash
$ sh
# echo $0
sh
# ps -p $$
PID TTY TIME CMD
24794 pts/0 00:00:00 sh
$ env | grep SHELL
SHELL=... //처음과 동일함. sh가 아님.
Recent comment