0

As per my knowledge Process ID 1 is reserved for init.

What does process id 2 indicate? why no softlink to the binary executable for this process ID.

sudo ls -l /proc/1/exe    
lrwxrwxrwx 1 root root 0 Apr 24 14:53 /proc/1/exe --> /sbin/init  

But for /proc/2/exe

ls : cannot read symbolic link /proc/2/exe: No such file or directory
lrwxrwxrwx 1 root root 0 Apr 24 14:53 /proc/2/exe

Im using Ubuntu 12.04.

pls share your knowledge.

Jeyaram
  • 9,158
  • 7
  • 41
  • 63

2 Answers2

1

It's because there is no binary to link to. This process was probably started by the kernel itself. Take a look at the out put of ps aux. Any process you see listed in brackets will not have a exe soft link either.

gogators
  • 783
  • 2
  • 6
  • 17
0

because at the moment you are asking there is no process of pid 2. the kernel allocates pids at will.

Or because pid 2 is for some kernel task; on my machine it is for kthreadd which is some pure kernel process. See this answer.

Community
  • 1
  • 1
Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547