#include #include #include int main(){ printf("The path is: %s\n", getenv("PATH")); /* A pointer to the path */ char *path_string = getenv("PATH"); if(strstr(path_string, "sbin")){ printf("sbin is in the path, ifconfig should work\n"); } else { printf("sbin is not in the path\n"); } return 0; }