0

How to know the PID of the last open file (process) using the command line?

muru
  • 197,895
  • 55
  • 485
  • 740
Maythux
  • 84,289

1 Answers1

1

The PID of the last process started from the terminal can be found in the ! variable:

gedit &
echo $!
Maythux
  • 84,289