Introduction to C Programming [Part 1: Setup and terms] 01-12-2015, 09:47 PM
#1
So you want to learn how to program. Well, I think C is a great place. It is low level, but at the same time easy to understand once you've gotten the hang of it. Just a forewarning, I won't go into extreme detail in this series, it is just to get you comfortable enough to learn the rest on your own.
So, part 1. Let's get you all set up.
For the purpose of this tutorial, you will need to be running a linux system. I recommend Debian, and I will assume you are using Debian (or a debian-based system like ubuntu, KNOPPIX, DSL, etc).
Let's get started. This step MUST be followed EXACTLY. It will be redundant in most scenarios, but just in case.
You need to satisfy the following requirements to continue:
Alright, now let's get a list of the things we need:
Pretty simple. Let's install those things now.
Assuming it installed correctly, you can go ahead and run exit to get back to a normal terminal.
Terms:
How to use nano:
from a command line, type
It will open up the file, you can use the keyboard to navigate and edit. Here is a list of key combinations you should know:
Of course, ^ means control+
And there you have it, you're ready to start programming. In the next part I will start to teach you C from the ground up (the hard way, be afraid)
So, part 1. Let's get you all set up.
For the purpose of this tutorial, you will need to be running a linux system. I recommend Debian, and I will assume you are using Debian (or a debian-based system like ubuntu, KNOPPIX, DSL, etc).
Let's get started. This step MUST be followed EXACTLY. It will be redundant in most scenarios, but just in case.
You need to satisfy the following requirements to continue:
- Connect to the internet
- Open a TTY (CTL+ALT+F3 will get you one) or terminal emulator (I would use xterm if you have it)
- Root access (run sudo -s)
Alright, now let's get a list of the things we need:
- Text editor (we will use nano)
- C Compiler
Pretty simple. Let's install those things now.
Code:
apt-get update
apt-get install nano gccAssuming it installed correctly, you can go ahead and run exit to get back to a normal terminal.
Terms:
Code:
Terminal - a TTY or terminal emulator
Editor - GNU Nano (our text editor)
Compiler - gcc (C compiler, turns our code into binaries)How to use nano:
from a command line, type
Code:
nano <filename goes here>Code:
^W - Find
^\ - Find/Replace
^O - Write file
^X - Exit (write if needed before exit)
^- - Go to lineAnd there you have it, you're ready to start programming. In the next part I will start to teach you C from the ground up (the hard way, be afraid)

























![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)











![[Image: rSwOeY5l.jpg]](http://i.imgur.com/rSwOeY5l.jpg)




![[Image: master645.png]](http://pile.randimg.net/1/62/78105/master645.png)