for dummies and traitors(windows users)

first of all this is for people who dont know how to compile c on linux cause i didn't use the bash for some time i had some difficulties to get to compile the programs but i managed to at last !

so let's start from the begining.

--open your terminal (if u dont know how then go to .... goggle)

ok then there are 2 programs to use 1- gcc 2- vi

those programs are in every Linux's distribution (I think so!)

ok first thing is to create a file to write into by using (touch)

try this

>>> touch test.c

then

>>> ls

you will find the new file listed like this

ash@localhost ~$ ls

Desktop/ Download/ Pictures/ test.c* tmp/

Documents/ Music/ Videos/

then now you can open it using (vi) "a simple text editor"

>>> vi test.c

ok now if you want to insert text press (i) and type what ever u want

then after u finish press Esc then type

" (:wq) to quit with saving OR (:q)to quit without saving "

if u did press Esc without noticing(i always do) u can return to text inserting mode by pressing (i)

BTW : to quickly view a text file type in termenal >>> cat test.c

now try to write this to the file

  #include <stdio.h>

int main()

{

printf("fokak meny\n");

return 0;

}

then save

to compile it then type in termenal

>>> gcc -o test.o test.c

the test.o is the output file

to run ur program simply type in termenal

>>> ./test.O

if u want more knowledge in those commands type(for example)

>>> man vi

>>> man cat

that's all folks!!

N.B: plz replay if u need more of those stupid lessons (no replays means that everybody there has already done all this before so no need for this )

thank you

ASH