title: How to get all parent processes and all subprocesses with `pstree`
body: <p>Command <code>pstree PID</code> can show all subprocess information of the process specified by <code>PID</code>. However, I also want to know all parent process information of the process <code>PID</code>, how can I get it?</p>
  <p>An example:</p>
  <pre>
  init
  |- parent_process
  |    `- current_process
  |       |- subprocess_1
  |       `- subprocess_2
  `- other_process
  </pre>
  <p>What I want is when I run <code>pstree current_process_pid</code>, I want to get below output:</p>
  <pre>
  init
  `- parent_process
      `- current_process
         |- subprocess_1
         `- subprocess_2
  </pre>
  <p>When I run <code>pstree subprocess_1_pid</code>, it will output:</p>
  <pre>
  init
  `- parent_process
      `- current_process
         `- subprocess_1
  </pre>