0

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

1
  • I am assuming you don't mean the last time GNOME Terminal was opened.
    – muru
    Apr 20, 2015 at 14:25

1 Answer 1

1

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

gedit &
echo $!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .