如果.c文件在文件夹中,我不知道如何在Ubuntu中编译C程序。
当文件在桌面上时,我打开终端,我写dir,然后cd Desktop,然后gcc hello.c -o hello,然后./hello。如果程序在桌面上的文件夹中,我该怎么办?
dir
cd Desktop
gcc hello.c -o hello
./hello
如同.c在桌面中,但导航到cd folder文件夹一样
cd folder
cd Desktop cd folder_name
这很简单。