Linux系统下运行C语言程序

Linux系统下运行C语言程序

创建目录

在这里插入图片描述

编写代码

在这里插入图片描述

编译

在这里插入图片描述
命令 ------- 参数-----编译后的文件名--------编译的源文件

运行

在这里插入图片描述

shiyanlou:~/ $ mkdir c                                                [1:09:28]
shiyanlou:~/ $ cd c                                                   [1:09:32]
shiyanlou:c/ $ ls                                                     [1:09:34]
shiyanlou:c/ $ touch hello.c                                          [1:09:36]
shiyanlou:c/ $ ll                                                     [1:09:49]
总用量 0
-rw-rw-r-- 1 shiyanlou shiyanlou 0 320 01:09 hello.c
shiyanlou:c/ $ vi hello.c                                             [1:09:51]
shiyanlou:c/ $ ls                                                      [1:11:45]
hello.c
shiyanlou:c/ $ gcc -o hell hello.c                                     [1:12:18]
shiyanlou:c/ $ ls                                                      [1:12:35]
hell  hello.c
shiyanlou:c/ $ ./hell                                                  [1:12:37]
hello world!

Linux系统下运行Sh语言程序

在这里插入图片描述

#!/bin/bash

for ((i=0; i<10; i++));do
    echo "hello shell"
done

exit 0
#-------------------------------------------------
chmod 755 hello_shell.sh
#--------------------------------------------------------
./hello_shell.sh
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值