

If you won’t do that, an object file named a.out will be automatically generated. Keep in mind that it is optional to provide the output object file (-o my_program). Switch to directory where you have kept your C program (or provide the path) and then generate the object file by compiling the program: gcc -o my_program my_program.c In Debian and Ubuntu-based Linux distributions, use the apt command: sudo apt install gcc You can install gcc using your distribution’s package manager. The most popular compiler is gcc ( GNU Compiler Collection). In order to run a C program in Linux, you need to have a C compiler present on your systems. Method 1: How to run C programs in Linux terminal In fact, I’ll discuss how to run C programs in Linux terminal as well as in code editor. If you are new to either C or Linux, I’ll show these steps in detail so that you feel comfortable coding C program in Linux environment. This was just the quick summary on how to compile and run C program in Linux. Step 3: You run the generated object file to run your C program in Linux. Step 2: You compile the program and generate the object file using gcc compiler in a terminal like this: gcc -o my_program my_program.c Step 1: You write your program and save the file with a. To enter into fullscreen mode press Alt+Enter and press it again for window mode.How do you program in C on Linux? It is indeed very easy and consists of three simple steps. The installer will install the files.Once finished u can delete the setup folder.ĥ.To run the Turbo C++ every time run the following commands: 1.mount c ~ Press Enter.Ĭhange the source path to \setup if it isn't.Press Enter.Ĥ.Select Start Installation and Press Enter. Write the following commands : 1.mount c ~ģ.The turbo C++ installation utility will appear.

Move the extracted folder to your home folder RAR file by "right-click" then chose " extract here " Step 1 : goto your Terminal then type sudo apt-get install unrar

If you don't have unrar utility you just need to install small package called " unrar " Or using terminal: sudo apt-get install dosboxġ.Extract the rar file and you'll get a setup folder. To run Turbo C++ in Ubuntu you must have the following:Ī.Turbo C++ setup If you have the setup then excellentī.DOSBox Emulator If you have it installed on your system the good but if you don't go to Ubuntu Software Center and search for DOSBox and install the emulator. Source : How to install the Code::Blocks IDE? Or install via the terminal: sudo apt-get install codeblocks

Just open the Ubuntu Software Center and search for its name.
