Para ejecutar comandos Linux desde Sublime Text contra WSL, crea un build system.
WSL 2
{
"shell_cmd": "bash -c \"wslpath '${file}'\" | bash -s",
"shell": true
}
Compilar C++
{
"shell_cmd": "ubuntu run \"g++ `wslpath '${file}'` && ./a.out<inp.in>out.in \"",
"shell": true,
"working_dir": "$file_path",
"selector": "$file_name"
}
WSL 1
Copia C:\Windows\System32\bash.exe a C:\Windows\SysWOW64\ y crea:
{
"cmd": ["bash", "-c", "gcc ${file_name} -o ${file_base_name} && ./${file_base_name}"],
"shell": true,
"working_dir": "${file_path}"
}
Puedes ejecutar cualquier comando Linux con bash -c "comandos".