When you run an app on your computer, it is assigned a process ID, or PID. You can find the PID of a running app in several ways.
One way to find the PID of a running app is to use the Task Manager in Windows. To open the Task Manager, press Ctrl+Shift+Esc on your keyboard. Once the Task Manager opens, click on the Processes tab. The PID will be listed in the PID column.
Another way to find the PID of a running app is to use the ps command in Linux. To use this command, open a terminal window and type ps -e | grep [app name]. This will return a list of all processes running on your system, with the name of your app included. The number next to your app's name is its PID.
If you need to get the PID of an app that is not currently running, you can use the pidof command in Linux. This command takes the name of an executable as an argument and returns its process ID if it is running. For example, pidof firefox would return the process ID for Firefox if it were currently running.