Hind Forsum Hind Forsum - 21 days ago 9
Linux Question

How to know the process id of current bash session?

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?


Answer Source

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