在ubuntu编写helloworld

安装vim

打开终端
输入sudo apt-get install vim-gtk
输入登陆密码
等待安装完成

编译C

创建.c文件:vim helloworld.c
编写代码,保存并退出

编译:gcc helloworld.c -o helloworld
运行:./helloworld

命令 说明
:q! 强制退出,不保存
:q 退出
:wq! 强制保存并退出
:w <文件路径> 另存为
:saveas 文件路径 另存为
:x 保存并退出
:wq 保存并退出

linux直接编译helloworld

 #bin/Bash
echo "hello world"

posted @ 2019-11-27 21:28  春日宴  阅读(1530)  评论(0编辑  收藏  举报