Which special shell variable represents the process ID of the currently running shell?

Basic of linux unix MCQs for PPSC, FPSC, NTS, and Pakistan government job tests. Select an option below, then read the explanation.

PPSCFPSCNTSPakistan govt jobs
Subject
Basic of linux unixsoftware-engineering-mcqs › basic-of-linux-unix
Published
9 Apr 2019
Last updated
28 May 2026

Browse all Basic of linux unix MCQs

Choose the correct answer

Explanation

In shell scripting, $$ holds the process ID of the current shell. $! refers to the last background process ID, $0 is the script name, and $* contains all positional parameters.

PakQuizHub — free MCQs and past papers for Pakistan government job tests. Content is for educational practice only.