LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-23-2011, 08:33 AM   #1
ohmsray
LQ Newbie
 
Registered: Aug 2011
Posts: 3

Rep: Reputation: Disabled
programming in c


please advice on how to use the terminal to program in the c language.
 
Old 08-23-2011, 08:55 AM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Hello ohmsray, welcome to LQ,

in the terminal you will need an editor, for example vi or emacs. You write the sourcecode with the editor. Compiling is done on the commandline. For example, if you have progamcode called hello.c you may execute
Code:
gcc -o hello hello.c
the outputfile will be "hello" and can be executed with
Code:
./hello
in Linux other than Windows you'll have to use the path to the programm even it is in your current working directory.

It would be helpful if you explain what you want to do.

Markus
 
Old 08-23-2011, 05:57 PM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Note that vi and Emacs are not like most editors, you can't just start typing like in a normal GUI editor. If you want something simpler, try nano. But if you're going to do a lot of editing, I would recommand that you learn vi or Emacs.
 
Old 08-24-2011, 05:24 AM   #4
ohmsray
LQ Newbie
 
Registered: Aug 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
thanks

i appreciate your responses alot thanks once again,my problem is that am not familiar enough with using the editors.guys if you dont mind would you please advice or atleast help me on it or give me a tutorial on how to use emacs,vi,and nano.
 
Old 08-24-2011, 06:32 AM   #5
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Well, assuming you have vim already installed. Check that you have a file .vimrc in your home-directory, if not copy the file /usr/share/vim/vim73/vimrc.sample.vim as .vimrc into your home-directory.

vim is a modern clone of the standard-Unix-editor vi.

vim comes with a tutorial, simply execute "vimtutor" on the commandline.

At first sight vim is a little difficult to use, but the best choice when one uses no gui at all. Once you are familiar with vim you'll never use another editor. It is the fastest and most convenient way to edit files. I've installed vim on all my Windows-servers.

Markus
 
1 members found this post helpful.
Old 08-24-2011, 06:51 AM   #6
0men
Member
 
Registered: Mar 2011
Location: Gold Coast, Australia
Distribution: saline, centos, freeBSD, slackware
Posts: 182

Rep: Reputation: 22
Hey,

Well you can use Vi or Nano. Nano is more user friendly, but if you willing to learn a little bit than i agree with marcush, that is, Vi is a lot better for editing. If you want a non-terminal editing program, Kate is awesome for any KDE system, and i dont mind Gedit (after a little bit of customizing) for gnome.

The first look at Vi, its a little difficult to grasp, but once you know it thats all you'll use
Jump onto youtube and have a look, they have some pretty good tutorials on how to use editors.

If your after programming tutorials, "thenewboston" <<---- (his channel on youtube) has easy to understand beginner tutorials.

Good Luck !
 
1 members found this post helpful.
Old 08-24-2011, 08:32 AM   #7
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
No learning is necessary for nano. Just open it up and start typing. It even has a keyboard shortcut reference at the bottom of the screen.

For Vim, try running the "vimtutor" command. There are also many vi and Vim tutorials on the Internet.
 
1 members found this post helpful.
Old 08-27-2011, 06:36 AM   #8
ohmsray
LQ Newbie
 
Registered: Aug 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thumbs up grattyud

guys thanks alot
 
Old 08-21-2012, 06:35 PM   #9
momok
LQ Newbie
 
Registered: Jun 2011
Posts: 12

Rep: Reputation: Disabled
you can also use scite if you want as an alternative or blue-fish
 
  


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




All times are GMT -5. The time now is 04:16 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