Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2930

Can't run pwd executable from pwd [duplicate]

$
0
0

I've just started using ubuntu & gcc and I must be doing something really silly but I can't fathom what and I can find nothing searching. This is my code

tom@sp4:~$ mkdir testtom@sp4:~$ cd testtom@sp4:~/test$ echo "#include <stdio.h>" > demo.ctom@sp4:~/test$ echo "int main() {printf(\"hw\n\"); return 0;}" >> demo.ctom@sp4:~/test$ cat demo.c#include <stdio.h>int main() {printf("hw\n"); return 0;}tom@sp4:~/test$ make democc     demo.c   -o demotom@sp4:~/test$ demoCommand 'demo' not found, did you mean:  command 'nemo' from deb nemo (4.4.2-2)  command 'idemo' from deb ivtools-bin (1.2.11a2-4build2)Try: sudo apt install <deb name>tom@sp4:~/test$ ../test/demohw

Why does 'demo' return an error but '../test/demo' works OK? What's the difference?

Edit. I should add I'm executing this code from the ubuntu (20.04) tab in windows 10 terminal through wsl2 (no idea if I've termed that correctly).

Edit2.

tom@sp4:~/test$ echo $PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Users/tamby/AppData/Local/Microsoft/WindowsApps:/snap/bin

Edit3. Duplicate questions answers this for me. Thanks.


Viewing all articles
Browse latest Browse all 2930

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>