CS1020: Intro Workshop. Topics CS1020Intro Workshop - 2 1. Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………

Slides:



Advertisements
Similar presentations
CS1020 Week 3: 29th January 2015.
Advertisements

Introduction to the Omega Server CSE Overview Intro to Omega Basic Unix Command Files Directories Printing C and C++ compilers GNU Debugger.
Dayu Zhang 9/8/2014 Lab02. Example of Commands pwd --- show your current directory This is home of venus, not your home directory Tilde: means you are.
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
ECT 250: Survey of e-commerce technology Publishing pages on a Unix system.
Introducing the Command Line CMSC 121 Introduction to UNIX Much of the material in these slides was taken from Dan Hood’s CMSC 121 Lecture Notes.
Dayu Zhang 9/3/2014 Lab01. Lab Instructor: Dayu Zhang Office Hour Mon/Wed 10:40am – 11:10am Room A201 Lab Website
Unix Workshop Aug What is Unix Multitasking, multiuser operating system Often the OS of choice for large servers, large clusters.
Command Console Tutorial BCIS 3680 Enterprise Programming.
Editing Java programs with the BlueJ IDE. Working environments to develop (= write) programs There are 2 ways to develop (write) computer programs: 1.Using.
A crash course in njit’s Afs
L INUX C OMMAND L INE I NTERFACE G UNAANBAN.G
UNIT 1 Computing Fundamentals.
Help session: Unix basics Keith 9/9/2011. Login in Unix lab  User name: ug0xx Password: ece321 (initial)  The password will not be displayed on the.
Linux environment ● Graphical interface – X-window + window manager ● Text interface – terminal + shell.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction Unix-like system is everywhere Linux Android for smartphones Google Chrome OS for Chromebook Web.
Computer Programming for Biologists Oct 30 th – Dec 11 th, 2014 Karsten Hokamp  Fill out.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
The UNIX development environment CS 400/600 – Data Structures.
Vim Editor and Unix Command gcc compiler Computer Networks.
1 Editing a C Program 01/16/15. 2 Objective Use Linux to edit, compile and execute a C program.
PROGRAMMING PROJECT POLICIES AND UNIX INTRO Sal LaMarca CSCI 1302, Fall 2009.
1 Lab 2 “Hello world” in Unix/Linux #include "std_lib_facilities_4.h" int main(){ cout
UNIX Workshop Freshmen Orientation UNIX workshop Before we begin…  Does everybody have a computer?  Does everybody have your account slips?
Getting started: Basics Outline: I.Connecting to cluster: ssh II.Connecting outside UCF firewall: VPN client III.Introduction to Linux IV.Intoduction to.
Next Unix Topics Tuesday, 2/11 & 18/2014. Change Password (by 2/14/14) ssh to account on – faclinux.cse.ohio-state.edu – stdlinux.cse.ohio-state.edu passwd.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
Unix and Samba By: IC Labs (Raj Kidambi). What is Unix?  Unix stands for UNiplexed Information and Computing System. (It was originally spelled "Unics.")
Introduction To UNIX. FAQReferencesSummaryInfo Resources Introduction Learning Objectives Log on User Interface Commands List of Commands Useful Info.
Unix Environment Input Output 2  List Content (ls) ◦ ls (list current directory) ◦ ls –all (include hidden files/folders)  Make directory (mkdir) ◦
Creating Programs on UNIX This term you can create programs on UNIX or you can create programs using a C++ compiler on your PC. This set of slides steps.
Linux and Java Basics. What is Linux? Operating system by Linus Torvalds that was a clone of Unix (thus Linux) Free and open source – this is the reason.
1May 16, 2005 Week 2 Lab Agenda Command Line FTP Commands Review More UNIX commands to learn File name expansion - * Introduction of vi.
1 Creating Web Services Presented by Ashraf Memon Hands-on Ghulam Memon, Longjiang Ding.
PostgreSQL Installation By: Keerthi Nelaturu Previous version by Ahmed Jeddah & Miguel Garzon.
PTA Linux Series Copyright Professional Training Academy, CSIS, University of Limerick, 2006 © Workshop III - Part A Shell Commands Professional Training.
More on Using onyx 8/28/13. Program 1 Due a week from today. See website for details.
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
1 Getting Started with C++ Part 2 Linux. 2 Getting Started on Linux Now we will look at Linux. See how to copy files between Windows and Linux Compile.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
1 CS101 Fall 2001 Lecture 1 In order to write a program, you must first telnet to your pegasus account and login either from a Rutgers computer in a lab,
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
ITX2000 Remote hosts and web servers Prof. Xiaohong (Sharon) Gao Room: T125 Ext: Week 14 – UNIX vi text editor.
Building Your Own Website Using:. Install & configure LAMP. Download WordPress and run it as a local website on your Raspberry Pi. Configure WordPress.
Assignprelim.1 Assignment Preliminaries © 2012 B. Wilkinson/Clayton Ferner. Modification date: Jan 16a, 2014.
UNIX Basics Matt Hayward October 18, 2016 LS560 – Information Technology for information professionals.
Tutorial Six Linux Basics CompSci Semester Two 2016.
GRID COMPUTING.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
First Day in Lab Making a C++ program
CS1010: Intro Workshop.
Development Environment Basics
Getting started with CentOS Linux
Tutorial Six Recap & Linux Basics CompSci Semester Two 2016.
Web Programming Essentials:
CS1010 Programming Methodology
Andy Wang Object Oriented Programming in C++ COP 3330
The Command Prompt Commands are the way to “do things” in Unix
Part 3 – Remote Connection, File Transfer, Remote Environments
Assignment Preliminaries
Practice #0: Introduction
Intro to UNIX System and Homework 1
Web Programming Essentials:
Run Java file with Window cmd
Getting started with CentOS Linux
Andy Wang Object Oriented Programming in C++ COP 3330
UNIX/LINUX Commands Using BASH Copyright © 2017 – Curt Hill.
Java Tutotrial for [NLP-AI] 2
CSCE 206 Lab Structured Programming in C
Presentation transcript:

CS1020: Intro Workshop

Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………

CS1020Intro Workshop - 3 sunfire UNIX server or

Logging into UNIX System (1/3) To login to sunfire server, you need your SoC UNIX account user-name and password. If you don’t have it yet, create your account here:  We will start at _______ In the meantime, please read the document “Intro Workshop: Developing Java programs on sunfire” on this CS1020 web page:  CS1020Intro Workshop - 4

2.Click on “Quick Connect” to get the pop-up window. Enter “sunfire” for Host Name if connecting within campus or “sunfire.comp.nus.edu. sg” if connecting from off campus Enter your UNIX id as User Name. Logging into UNIX System (2/3) CS1020Intro Workshop Look for the SSH Secure Shell Client icon or Xshell icon on your desktop, and double click on it. We shall assume you are using the former here. or

Intro Workshop Enter your UNIX password. 4.Once you log in successfully into your UNIX account, you will see this screen (actual display may vary). Logging into UNIX System (3/3) CS To log out from your UNIX account, type “exit” or “logout”.

Topics CS1020Intro Workshop Login to UNIX operating system 2. Setup your Sunfire account 3. …………………………………… 4. …………………………………… 5. ……………………………………

Set up Your Sunfire Account (1/2) Now you are successfully connected to sunfire.  What happened indeed? CS1020Intro Workshop - 8

Set up Your Sunfire Account (2/2) Every SoC student has an account on sunfire. You can do many interesting things with your sunfire account.  e.g. Some treat their sunfire account as a thumb drive! CS1020Intro Workshop - 9

Set up Your vim If this is your first time logging in  Type the following two commands one by one to configure your account for programming: 1. ~cs1020/workshop/setup (enter y when prompted) 2. source.bash_profile (no response from the system is good news!) CS1020Intro Workshop - 10

Topics CS1020Intro Workshop Login to UNIX operating system 2. Setup your Sunfire account 3. Basic UNIX commands 4. …………………………………… 5. ……………………………………

Basic UNIX commands (1/5) Tree structure CS1020Intro Workshop - 12

Basic UNIX commands (2/5) In a UNIX shell (like sunfire), you need a lot of typing but much less mouse clicking, compared with Windows operating system which you might be more familiar with. There are a few useful commands that you need to remember which will facilitate your navigation in the UNIX world. Practice is the best way to recognize UNIX commands. Gradually you will be more and more familiar with UNIX commands – so don’t worry too much at the beginning. CS1020Intro Workshop - 13

Basic UNIX commands (3/5) ls command (means list directory contents) will enable you to see all the files and subfolders in current folder. There are a few more complex usage of ls, but first of all, be familiar with the simplest one – just “ls”. CS1020Intro Workshop - 14

Basic UNIX commands (4/5) mkdir (means make directory) will create a sub-directory. rmdir (means remove directory) will delete an empty directory. CS1020 make a new directory the new directory just created Intro Workshop - 15

Basic UNIX commands (5/5) cd command allows you to enter a designated directory.  cd workshop will bring you to workshop directory  cd.. will bring you back to the parent directory (note there must be at least one space between cd and.. ) CS1020 Enter this directory Intro Workshop - 16

Topics CS1020Intro Workshop Login to UNIX operating system 2. Setup your Sunfire account 3. Basic UNIX commands 4. Coding: Edit – Compile – Run 5. ……………………………………

Programs: Edit, Compile and Execute CS1020 produces Source code HelloWorld.java Editor vim HelloWorld.java produces Bytecode HelloWorld.class Compiler javac HelloWorld.java Execution java HelloWorld produces Hello World! Sample output Intro Workshop - 18

Writing a Java Program using vim Vim is a powerful text editor  Command Mode is used to issue vim commands.  Insert Mode is used to type in text.  Switch back and forth between two modes:  i (to get into insert mode; other commands possible)  (to go to command mode) CS1020Intro Workshop - 19

Writing a Java Program using vim Now use vim to type in the follow program:  vim First.java CS1020 // This program adds two integers import java.util.*; public class First { public static void main(String[] args) { int x, y, sum; Scanner sc = new Scanner(System.in); System.out.print("Enter 2 integers: "); x = sc.nextInt(); y = sc.nextInt(); sum = x + y; System.out.println("Sum = " + sum); } Hint: different colours imply different meanings…  If you get a wrong colour, it means something is wrong! When finished: 1. Switch back to command mode 2. Save and quit vim by pressing key combination :wq Intro Workshop - 20

Videos on vim Four videos on vim are available on IVLE multimedia  These videos were created for CS1010 using C programs as examples. However, the vim commands are the same. CS1020Intro Workshop - 21

Compile a Program with javac javac is a compiler to translate your Java source code into bytecode.  javac First.java  javac may report compilation (syntax) error to you if any. Correct your program till it is free of syntax errors.  If there is no error, a bytecodef First.class will be created in the same directory; type ls to look for it. Run the bytecode by using java:  java First  Note: Not “ java First.class ” CS1020Intro Workshop - 22

UNIX Commands for File Processing cp command makes a copy of a file. mv command moves a file to another folder.  mv command can also be used to rename a file. rm command deletes a file. Check the write-up for more information CS1020Intro Workshop - 23

Topics CS1020Intro Workshop Login to UNIX operating system 2. Setup your Sunfire account 3. Basic UNIX commands 4. Coding: Edit – Compile – Run 5. File transfer between your Sunfire account and your own computer/laptop

File Transfer from/to Sunfire CS1020Intro Workshop - 25

Opening a Java Program in Windows CS1020Intro Workshop - 26

Congratulations! You have cleared this workshop (no certificate will be issued though…) You will gain more experience after days and weeks. Now you may want to log out from sunfire. The command is quite simple: exit or logout Remember to log out from your NUSNET account as well CS1020Intro Workshop - 27

End of File