cs.indstate.eduBe sure to press the enter key after typing the name. This should connect to the CS server. Go to step 3 to complete logging into the CS server.
putty.exe
login as:At this point you should enter your CS server user name (sent to you by email from me). Next the CS server asks for your password:
cs151dd@cs.indstate.edu's password:where cs151dd is your user name, with the two d's standing for the last two digits in your user name.. Type in your password (also from that email). NOTHING appears on the screen. If you make a mistake you can use the backspace key. Press enter when you finish.
cs151dd@cs:/u1/class/cs151dd>where the dd's stand for last two digits of your user name. The command prompt is prompting you enter a command. Each time you enter a command, the command is carried out, and you are given a new command prompt so you can enter another command.
When you use the pico command (see 5 below) to write a file, you interact with pico. You do not immediately get a new command prompt. Command pico collects what you type to be put into the file until you type ^O and ^X (see below). When you type ^X pico stops and you get a new command prompt.
exitThat is type exit and press the return or enter key.
This is program 1, it's my first!
#include<stdio.h> int main() { printf("This is program %d its my %s!\n", 1, "first"); }
You have the option of changing the name (backspace, type a new name). In this case just press the enter key to accept first.c as the file name for the program.File Name to write: first.c
lsRemember to press the enter key after typing ls. This command lists out all files in your account. You should see the name
first.c
gcc first.csince we need to tell the operating system what C program file we want to compile. Remember to press the enter key.
If the compiler detects grammar errors (syntax errors), it prints messages on the screen telling you about the errors. If you have errors, you must use pico:
pico first.cto work on your C program. Once you have corrected the errors, re-compile the file. If no error messages appear, the compile has been successful. The machine language will be in a file, a.out. Again you can enter the ls command. It should show that you have two files: a.out and first.c.
a.out