'How to know the process id of current bash session? [duplicate]

I'm on a linux server and admin user. There're many admin users using this machine at the same time. So under current bash command line, how to know the current process id of the bash process I'm using?

Thanks!



Solution 1:[1]

You can use echo $$ to get the PID of the current Bash shell you are using.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Manuel Jordan