command not found

vim hello.c

gcc hello.c

gcc hello.c -o hello         //-o即output,即重命名为hello

方式一:(重启或者断开后因没写入到文件中去则还是不能执行)pwd查看路径后,

           添加路径:export PATH=$PATH:/home/guowenxue/test

方式2:vim ~/.bash_profile

         在代码中添加路径: export PATH=$PATH:/home/guowenxue/test

       然后重启就行!

        

 

猜你喜欢

转载自blog.csdn.net/adTeam_/article/details/81217371