Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

What does the output of the command below mean? (result is positive integer)

echo $$
share|improve this question
stackoverflow.com/questions/5163144/… is related –  kojiro Jan 20 '13 at 21:14
add comment

1 Answer

up vote 11 down vote accepted

The $$ variable in bash and other shells contains the process id of the shell.

share|improve this answer
+1. Documented in the bash manual –  glenn jackman Jan 20 '13 at 19:02
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.