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