What information is provided by the echo $$ command?
What information is provided by the echo $$ command?
The echo $$ command provides the process ID of the current shell. This is because the $$ variable in Unix-like systems refers to the process ID of the currently running shell instance.
[root@rhel8-02 ~]# ps -p `echo $$` PID TTY TIME CMD 1837 pts/0 00:00:00 bash
To prove it: ps aux | grep bash and compare it with previous echo $$