Multiple choice technology programming languages

What does $! represent?

  1. Process ID of current process

  2. Process ID of last background process

  3. Process ID of first background process

  4. Process ID of foreground process

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Unix/Linux shell scripting, the special parameter $! stores the process ID (PID) of the most recently executed background command. This is useful for tracking or killing background jobs. $0 represents the script name, and $$ represents the PID of the current shell process.