Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-12-2013, 05:56 PM   #1
Registered: May 2012
Posts: 64
Blog Entries: 1

Rep: Reputation: Disabled
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

Last edited by monojeffrey; 02-12-2013 at 05:56 PM. Reason: spelling mistake
Old 02-12-2013, 06:23 PM   #2
Senior Member
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413

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.
2 members found this post helpful.
Old 02-12-2013, 09:02 PM   #3
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.7, Centos 5.10
Posts: 16,917

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
You should see this tutorial
1 members found this post helpful.
Old 02-13-2013, 02:40 AM   #4
Registered: May 2012
Posts: 198
Blog Entries: 3

Rep: Reputation: 37
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.
1 members found this post helpful.
Old 02-13-2013, 02:46 PM   #5
Registered: May 2012
Posts: 64
Blog Entries: 1

Original Poster
Rep: Reputation: Disabled

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


programming, redhat

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Program for creating diagrams ThirtySixBelow Linux - Software 1 01-05-2010 02:31 PM
Creating a Perl Program with options HyperTrey Programming 15 12-18-2008 09:29 PM
Creating desktop link to java program patricktyler Fedora 3 02-03-2006 06:26 AM
creating an e-mail program hyperriven Programming 2 06-30-2004 03:58 AM
Creating Desktop Program Icon ss109 Linux - General 4 03-15-2002 12:26 PM

All times are GMT -5. The time now is 05:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration