Multiple choice technology operating systems

To show the current PID what command should be execute?

  1. echo$$
  2. echo$PID
  3. echo$USER
  4. echo$user
Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To show the current PID, you should use the command 'echo$$'. The $$ special variable in shell scripting returns the process ID of the current shell. Option B is incorrect because \$PID is not a valid variable. Option C is wrong as \$USER shows the username, not PID. Option D is incorrect because $user is also not a valid PID variable.