1. Getting Started, Using Putty

Dijkstra machine is available for undergraduate students. You are free to write, compile your software on Dijkstra. To connect a Linux machine from your Windows, the best client available is PuTTY. Open putty.exe from the archive (or just google it and download). The PuTTY window looks similar to this one:





You will use the machine Dijkstra for your codes, so fill in the information above:


Host Name: dijkstra.ug.bcc.bilkent.edu.tr


Write dijkstra in the text box below the title “Saved Sessions”, and then press “Save” button. You have now saved your session to the Dijkstra machine. Just double click on dijkstra and login with your own username/password.




2. Using FTP

You may want to implement your software in your own machine and IDE, but running on a Linux machine is a strict requirement for your homework to be graded.


In order to upload your files to your Dijkstra account, you may use several free ftp clients, including SmartFTP, WinSCP, CuteFTP, etc…


You can also use Windows Explorer as an ftp client. Just write the dijkstra host name starting with “ftp://” and enter your username and password when requested. You are free to upload your files like Windows Explorer (drag-and-drop fashion).




Bilkent network does only allow you to connect ftp servers or linux machines from inside the campus. If you are outside the campus, just make a VPN connection to Bilkent network. Details can be found at http://vpn.ug.bilkent.edu.tr/





3. Basic UNIX Commands


1) ls

ls (list) lists all files and directories in your current directory.


Sample usage:             ls –al (list all the files including hidden ones and list their properties)



2) cd

cd (change directory) allows you to move into and out of directories, much like double-clicking on folders on your PC.


Sample usage:             cd subdirectory (move into the folder subdirectory)

                                    cd .. (move one folder above in the directory listing)



3) mkdir

mkdir (make directory) lets you create new directories (folders) on your current directory


Sample usage:             mkdir new_directory_name



4) cp

cp (copy) command allows you to copy files to new files, or copy files and directories to new directories


Sample usage:             cp index.html index2.html (copy index.html file as index2.html)

                                            cp index.html \public (copy index.html file to public directory)



5) rm

rm (remove) is the UNIX command to delete files and, sometimes, directories. It's short for "remove". Be very careful when deleting stuff with this command, as UNIX usually has no recycle bin - once you've deleted something, it's gone forever!


Sample usage:             rm index.html (remove the file index.html)



6) more

The more command is a quick and easy way to view the contents of a text file on your server. Press the Enter key to scroll through one line at a time, or the Space bar to scroll one page at a time. To terminate action, press the key q.



7) man

man (manual) is the help system for  UNIX servers.


Sample usage:             man ls (show help file for ls command)



7) chmod, pwd, mv, rmdir,…

        You may want to check these commands out on your favorite search engine or just use man command. Two files (linux-commands.pdf, linux-commands2.pdf) are available at:





4. Compiling & Running Software


Suppose you have a cpp file example.cpp. You may want to produce object file in Linux environment using


g++  -c example.cpp


-c option produces object files and you will have example.o file. Executable file is produced using


g++  -o executable example.o


-o option produces the executable file named as executable. Running your own software is as easy as




Simply you can compile .cpp files directly (without producing object files) and run using


g++  example.cpp


It will create an executable file named “a.out”, and you can run it as :







5. Links:


1)         http://www.chiark.greenend.org.uk/~sgtatham/putty/

(Putty, telnet client for WindowsTM)

2)         http://www.elated.com/tutorials/management/unix/useful_commands/

(UNIX commands extended)

3)         http://www.math.montana.edu/help/software/unixtut/

(UNIX tutorial for beginners)

4)         http://sunsite.univie.ac.at/textbooks/emacs/emacs_toc.html

(GNU Emacs manual)

5)         http://www.tldp.org/HOWTO/Installation-HOWTO/

(The Linux Installation howto)

6)         http://gcc.gnu.org/onlinedocs/

(GCC tutorial)