Swordrock's Blog

Just another WordPress.com site

Introduction to Linux with Ubuntu

Hey its been a long time that i can not write but now i will . I begin to use Linux OS for a school project and now i am learning how to do things on Ubuntu 10.04 . Everything is so much clear and faster than windows on linux , trust me .

A code developer must do all its work on linux because there is so much useful libraries , scripts and other good stuffs here for you to develop good things with them.Someone says its so hard to get used to it , dont believe them and begin as quickly as possible.


To begin to use Ubuntu , first i downloaded it from internet , as you guess its all free  .You can use these links for installation guide and download  :





Ubuntu comes with a default Desktop enviroment called GNOME , and it seems so much like a windows , you can listen to music , surf on web , use office programs just like you did it on microsoft windows . So no problem…

Ubuntu gives you chance to work on different Desktop enviroments , they differ on Ram usage and other capabilities. As a developer my teacher said we need a superlight Desktop enviroment , then i choose XFCE . Its also so easy to download and begin to use . You can also get info about Xubuntu from there :




Then Ubuntu = Command window , you can do a lot using command window , and you will if you go on using this OS . I will share some important command for us beginners on it , and there is also so much useful link for this subject  , please read efficiently the Linux Command part , they are so good  :



Some important commands … You can add a new user by typing ;


You can change password by typing passwd  command .

Using cd command will change current directory and pwd will print the current directory you are still working in .

Then some file operations , you can add a new directory using mkdir command ,it is removed using rmdir .

You can move files using mv command and also can erase them using rm command .

A very important thing  : Dont act as a superuser !! Its so much important , on linux as a default there is a superuser , who is unlimited and can do and change everything , and other users who are called normal . As a superuser , you can erase everything or change system configurations which will result in a fatal way .Dont do it . To act as a normal user , use sudo command , like :

>> sudo apt get install

command will install what you will type as argument on linux as a normal user .


Now i will come some development things . Using linux for development is different from how we do on windows . The steps for printing Hello world in C language like that :

1) Open a file in your current directory and write these codes in it :

# include <stdio.h> // standart in and standart out steams library


int main () {

printf (“Hello world”);

return 0;


2 ) Save this file as “hello.c”  then close it .

3)Open your command window , first we must compile to use it . To compile , type this command on window :

gcc -o hello hello.c


GCC is C compiler on linux and know what to do ,reprocessing , compiling , linking …

-o command means an output named hello will be written after compilation completed .


4) Now we are ready to run it . You run programs on linux by these commands :




This will print a hello world to our page.


For a last thing , i will talk about OpenCV libraries . I will use OpenCV libraries on linux for our school projects and as you guess first i have to install it on my Ubuntu . OpenCV is a image processing , gui development and computer vision free library of Intel.So much thanks to Intel for publishing it free .


Like a lot of user , i use SAMONTAB s method on installing and trying libraries , the adress is here :



It works fine , then try face detection example to make sure if you do all steps good .


Thanks for reading , i will go on sharing about linux and OpenCV and C development using linux . I hope 🙂 Bye !






Temmuz 9, 2011 Posted by | C/C++ programming | , , , , | Yorum bırakın