首先应该有一个IDE,可以参考下面的进行选择:
http://www.lupaworld.com/article-210675-1.html
我比较喜欢eclipse
在命令行执行下面命令安装:
sudo apt-get install eclipse-cdt eclipse 新建项目: project->new->c/c++->hello,world 工程 运行: 右键你的工程文件,build configurations->build selected->选中degug或者release 接下来接可以运行了