LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-03-2008, 11:28 AM   #1
zainab
LQ Newbie
 
Registered: Aug 2008
Posts: 7

Rep: Reputation: 0
How 2 program?


I have installed linux5 but i do not have any command line interface.
so how to do c-programming in it .do i have to install any software?
 
Old 08-03-2008, 11:35 AM   #2
serafean
Member
 
Registered: Mar 2006
Location: Czech Republic
Distribution: Gentoo, Chakra
Posts: 905
Blog Entries: 13

Rep: Reputation: 122Reputation: 122
Hi, and welcome

in order to start programming, you need a text editor and a compiler (usually gcc). You might also want to install any libraries you want to use in your programs. Also, giving the name of your distro could help.

Serafean
 
Old 08-03-2008, 12:06 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by zainab View Post
I have installed linux5 but i do not have any command line interface.
so how to do c-programming in it .do i have to install any software?
Welcome to LQ!!

What is "Linux5"? (Somewhere, there will be a brand name like Fedora, Ubuntu, Debian, etc.

Somewhere in the menus, there is a terminal. Or, you can get a terminal by doing "ctrl-alt-F1"
 
Old 08-06-2008, 11:37 AM   #4
zainab
LQ Newbie
 
Registered: Aug 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by serafean View Post
Hi, and welcome

in order to start programming, you need a text editor and a compiler (usually gcc). You might also want to install any libraries you want to use in your programs. Also, giving the name of your distro could help.

Serafean
I have the text editor but how do i install the compiler ?
I am able to edit the program using vi edit command but commands like gcc and ./a.out are not working so please tell me how do i install the compiler?
 
Old 08-06-2008, 11:51 AM   #5
kenoshi
Member
 
Registered: Sep 2007
Location: SF Bay Area, CA
Distribution: CentOS, SLES 10+, RHEL 3+, Debian Sarge
Posts: 159

Rep: Reputation: 32
Open up a terminal and type:

yum install gcc

This is assuming you have either CentOS or RHEL 5.
 
Old 08-06-2008, 11:55 AM   #6
john test
Member
 
Registered: Jul 2008
Distribution: ubuntu 9.10
Posts: 527
Blog Entries: 1

Rep: Reputation: 35
Another alternative would be to type "apt-get install gcc" at the prompt or go into synaptics from the Menu and load gcc from there.
The above is distro dependant of course
 
Old 08-06-2008, 11:57 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Or better
Code:
yum groupinstall "Development Tools"
or
Code:
apt-get install build-essential
to install all the development utilities like make, ld and so on. You can also use the graphical package management tool of your system. For example System --> Administration --> Add/Remove software on Fedora, or Yast Package management on OpenSUsE, or Synaptic on Ubuntu and so on. Which is your distribution, anyway? Try
Code:
lsb_release -a
to find out.
 
Old 08-09-2008, 05:30 AM   #8
zainab
LQ Newbie
 
Registered: Aug 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colucix View Post
Or better
Code:
yum groupinstall "Development Tools"
or
Code:
apt-get install build-essential
to install all the development utilities like make, ld and so on. You can also use the graphical package management tool of your system. For example System --> Administration --> Add/Remove software on Fedora, or Yast Package management on OpenSUsE, or Synaptic on Ubuntu and so on. Which is your distribution, anyway? Try
Code:
lsb_release -a
to find out.
Thanks so much for your suggestion but actuall neither of it is working and its asking me to connect to the RHN terminal ... so actually how to connect to the RHN terminal and my distributor is RedHat.Thanks in advance.
 
Old 08-09-2008, 05:31 AM   #9
zainab
LQ Newbie
 
Registered: Aug 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kenoshi View Post
Open up a terminal and type:

yum install gcc

This is assuming you have either CentOS or RHEL 5.
Thanks so much for your suggestion but actually it is not working and its asking me to connect to the RHN terminal ... so actually how to connect to the RHN terminal and my distributor is RedHat.Thanks in advance.
 
Old 08-09-2008, 05:33 AM   #10
zainab
LQ Newbie
 
Registered: Aug 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by john test View Post
Another alternative would be to type "apt-get install gcc" at the prompt or go into synaptics from the Menu and load gcc from there.
The above is distro dependant of course
Thanks so much for your suggestion but actually it is not working and i don't have anything called synaptics its asking me to connect to the RHN terminal ... so actually how to connect to the RHN terminal and my distributor is RedHat.Thanks in advance.
 
Old 08-09-2008, 05:55 AM   #11
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
It was not clear from your first post that your system is running Red Hat Enterprise. You can update your profile to include your distribution, so that it is displayed under your nickname in all your posts.

To install software in RHEL you must have a valid subscription. Then you can connect to the Red Hat Network with your username and password and install software through the web. Otherwise use up2date from a terminal. See
Code:
man up2date
to see the syntax to install a group of package, that one providing all the essential tool to develop applications. Check also the documentation in the Red Hat Network site, to see the various alternatives to install software on your system. Good luck!
 
Old 08-31-2008, 02:12 PM   #12
zainab
LQ Newbie
 
Registered: Aug 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colucix View Post
It was not clear from your first post that your system is running Red Hat Enterprise. You can update your profile to include your distribution, so that it is displayed under your nickname in all your posts.

To install software in RHEL you must have a valid subscription. Then you can connect to the Red Hat Network with your username and password and install software through the web. Otherwise use up2date from a terminal. See
Code:
man up2date
to see the syntax to install a group of package, that one providing all the essential tool to develop applications. Check also the documentation in the Red Hat Network site, to see the various alternatives to install software on your system. Good luck!
I already have the library called libgcc in my list of installed software but when i try to compile the programs and type gcc on the command prompt it gives an error saying gcc command not found so what should i do?please help
 
Old 08-31-2008, 02:15 PM   #13
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
You may have the library installed, but you probably still need to install the compiler itself. You can check by running "rpm -q gcc" to see if it is installed. If it's not, you'll need to use up2date to install it, as colucix suggests. Consult your Red Hat documentation and read "man up2date" for more information.
 
Old 08-31-2008, 02:24 PM   #14
zainab
LQ Newbie
 
Registered: Aug 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks for ur previous reply
I have the library called libgcc installed in my list of software programs but when i try to compile c or c++ programs using gcc it gives me an error saying command gcc not found and what is the path to actually do and save i generally do it on home@localhost is my path right?please help.Thanks in advance.
 
Old 08-31-2008, 02:27 PM   #15
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by zainab View Post
Thanks for ur previous reply
I have the library called libgcc installed in my list of software programs but when i try to compile c or c++ programs using gcc it gives me an error saying command gcc not found and what is the path to actually do and save i generally do it on home@localhost is my path right?please help.Thanks in advance.
You've been told several times that you need the compiler itself installed. Please read the posts above to find out how to do that.

As far as where to write programs, no, it doesn't matter (and why should it?) - it's up to you.

Please use more punctuation. Your post is a bit difficult to read without it.
 
  


Reply


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
Simple C++ Program: Program Compiles But Won't Run (Segmentation Fault) violagirl23 Programming 3 01-09-2008 01:09 AM
A program for FC4 to communicate with a Windows Hyperterminal Program at other end vhasun Linux - Software 2 05-19-2006 03:54 PM
Total recovery: Which program? ghost4linux, YaST2? Best drive imaging program? lagu2653 Linux - Software 1 06-20-2005 02:44 PM
Stop java program(threaded program..should end cleanly) rmanocha Programming 4 11-09-2004 10:36 AM
Gtk-Warning but program still works... I close konsole, program closes Laptop2250 Linux - Software 2 11-15-2003 12:18 AM


All times are GMT -5. The time now is 06:26 PM.

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