How Do You Write Code in Linux?
Contents How Do I Write Code in Linux? How to Write C Program in Ubuntu Open a Text Editor (Gedit, Vi). Command: Gedit Prog. C. Write a C Program. Example...
Contents
How do I write code in Linux?
How to Write C Program in Ubuntu
- Open a text editor (gedit, VI). Command: gedit prog.c.
- Write a C program. Example: #include<stdio.h> int main(){ printf(“Hello”); return 0;}
- Save C program with .c extension. Example: prog.c.
- Compile C program. Command: gcc prog.c -o prog.
- Run/ Execute. Command: ./prog.
How do I run a program in Linux?
To run a Linux program on Windows, you have these options:
- Run the program as-is on the Windows Subsystem for Linux (WSL). …
- Run the program as-is in a Linux virtual machine or Docker container, either on your local machine or on Azure.