Download presentation
Presentation is loading. Please wait.
1
ENEE150 Discussion 01 Section 0101 Adam Wang
2
Overview Log into GLUE Create a simple hello world program
Compile it with gcc and submit
3
What is GLUE? Basically a network of computers owned by UMD
You will submit your assignments to it so we can look at them Kind of like the cloud You will log into it by SSHing into linux.glue.umd.edu NOT glue.umd.edu
4
PuTTY SSH client SSH stands for Secure Shell
Basically lets you remotely login to the GLUE computers
5
Login to GLUE If you have a mac/linux just use terminal
Type “ssh linux.glue.umd.edu” If you’re using windows download PuTTY if you haven’t Linux.glue.umd.edu as the hostname and connect Login using regular UMD credentials
6
Glue is a UNIX environment
Command-line interface, made around 1970s “Dark room” environment You basically ask the computer to show what you want
7
Basic UNIX commands
8
pwd Print working directory Used to show where you currently are
9
ls Displays all files and folders currently within your pwd
Use “ls –l” to display even more information
10
mkdir Creates a new directory
Make a folder called “ENEE150” in your home directory by typing “mkdir ENEE150”
11
cd Change directory We will navigate into the ENEE150 directory by typing “cd ENEE150” If you hit tab the computer will try to autocomplete the file/folder name You can go to parent directory by typing “cd ..”
12
emacs Basic text editor, like eclipse/notepad/etc.
You can use vi/any alternative In the ENEE150 folder, type “emacs hello.c” to create/edit our first hello world program
13
Our first program Type Ctrl-x, Ctrl-s to save
Type Ctrl-x, Ctrl-c to close the window
14
Compile using GCC Gcc stands for GNU compiler collection
Basically transforms your code into an executable file Type “gcc hello.c” to compile your program This will create a file called a.out which can be executed If you type “gcc hello.c –o hello.x” it will name the executable hello.x instead of a.out Type a.out to run your program
15
Submit your file The format is “submit year semester class class# section assignment# filename” Type “submit 2017 fall enee hello.c” to submit your file to me Submit under assignment #0 as a test HWs will be assignment #1,2,3,… Projects will be assignment #10,20,30,… Submitting multiple times is ok, we will take the latest submission
16
Extra info
17
More UNIX commands Mv filename location “cut”
Cp filename location “copy & paste” Rm name remove file Rm –r name remove a folder
18
MobaXterm I recommend this over puTTY More features
19
Cygwin Portable Unix terminal for Windows
Lots of features & packages that come with it
20
WinSCP You can make the program on your own computer, then copy it over to glue Instead of writing your projects on glue
21
Final Words Make Backups Style is important Don’t Cheat
Coding is UNFAIR
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.