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.
Could anybody suggest another way to solve this problem in C programming?
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.