title: How to set path environment variable in linux in C language code
body: <p>I want to set a path environment variable in bash by C program.
  So I coded using 'setenv' function, But it was not the answer to solve.</p>
  
  <p>Could anybody suggest another way to solve this problem in C programming?</p>
  
  <p>I thought the other solution that the program read the profile file, then modify and save, but actually when I opened this file there's no string I wanted about PATH variable.   </p>