get process id of gnome-shell in linux code example
Example 1: how to get os name in c++
#include <stdio.h>
#if defined(_WIN32) || defined(_WIN64)
const char* os = "Windows";
#else
#ifdef __linux
const char* os = "Linux";
#else
const char* os = "Unknown";
#endif
#endif
int main(void)
{
printf("os = %s\n", os);
return 0;
}
Example 2: how to create a user and add it to a group in linux
useradd -G examplegroup exampleusername