-   Linux - Software (
-   -   Creating a C program in redhat (

monojeffrey 02-12-2013 05:56 PM

Creating a C program in redhat

kindly guide on this two concepts

What is a scrpit?(linux)
what is a program? ( C program)

both do automation(repetitive tasks, calculations)

how to create a C program in redhat
is it possible to place the c program as start up script?

heard like kernel of unix is written in C language(Dennis ritchie)

does all the nis,nfs and all other software distributions are written in the same manner as a C program

Kustom42 02-12-2013 06:23 PM


I appreciate that you are trying to learn how these things work but I think you should try to focus your learning a bit so you don't get overwhelmed and feel like you are all over the place.

The term "script" can be misconstrued easily, some people will use this term to refer to a compiled C program or to a basic for loop they wrote. It is kind of up your interpretation, it does not relate to a specific language or operating system. A .bat file on Windows could be considered a script.

C is a programming language, and yes most of the Linux kernel was wrote in C and the C programming language is a huge foundation for a lot of other programming languages and applications.

Now lets ask the first question.

Would you like to start by learning how to programming works and then learn how the Linux OS works?


Would you like to start by playing with the Linux operating system and learn programming later?

I would recommend you learn the basics of the OS, what BASH is and how to do the basics with it then you can start opening the programming can of worms.

Try to start learning the OS. It will give you some BASH scripting exposure which will translate into C programming a lot easier.

chrism01 02-12-2013 09:02 PM

You should see this tutorial

bloodstreetboy 02-13-2013 02:40 AM

Write any C program in text editor and save as filename.c
To run this program, you have to compile it first.


$ gcc -o anyname /path/of/your/c_program_file/filename.c
This will generate a compile copy of your program.
Now create output copy of your program.Following command generate a output file of your program in same directory.

$ gcc /path/of/your/c_program_file/filename.c
Now run your program.
$ ./a.out

where a.out is output copy of your program. Alternatively you can run compile copy of your program.

monojeffrey 02-13-2013 02:46 PM


i would like to learn only how the linux OS works, since already has some exposure to programming

thanks for the kindly replies and advices

All times are GMT -5. The time now is 02:12 AM.