CPSC 217 T03 Week I Part #1: Unix and HELLO WORLD Hubert (Sathaporn) Hu.

Slides:



Advertisements
Similar presentations
Lab III – Linux at UMBC.
Advertisements

Linux commands exercise 1. What do you need, if you try to these at home? You need to download and install Ubuntu Linux from the Internet – DVD is need.
CSE1222: Unix IntroThe Ohio State University1. Common Directory Commands  lsList directory contents  cd {dir}Change working directory to {dir}  pwdPrint.
UW CSE 190p Section 6/21, Summer 2012 Dun-Yu Hsiao.
ENEE150: Discussion 1 Section 0104 Please Sit Down at a Computer and Login!
Jump to first page Unix Commands Monica Stoica Jump to first page Introduction to Unix n Unix was born in 1969 at Bell Laboratories, a research subdivision.
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
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.
Working Environment - - Linux - -.
CS 202 Computer Science II Lab Fall 2009 August 27.
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
Command Console Tutorial BCIS 3680 Enterprise Programming.
UNIX By Darcy Tatlock. 1. Successful Log Into Unix To actively manipulate your website you need to be logged in. Without being logged in you cannot enter.
1 SEEM3460 Tutorial Unix Introduction. 2 Introduction What is Unix? An operation system (OS), similar to Windows, MacOS X Why learn Unix? Greatest Software.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  Currently there.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Learning basic Unix command IT 325 operating system.
Introduction to UNIX/Linux Exercises Dan Stanzione.
1 Day 3 Directories Files Moving & Copying. 2 Case Sensitive First thing to learn about UNIX is that everything is case sensitive. Thus the files: –enda.
Unix Primer. Unix Shell The shell is a command programming language that provides an interface to the UNIX operating system. The shell is a “regular”
© Crown copyright Met Office An Introduction to Linux PRECIS Workshop, University of Reading, 23rd – 27th April 2012.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
Unix Basics Chapter 4.
Introduction to Programming Workshop 1 PHYS1101 Discovery Skills in Physics Dr. Nigel Dipper Room 125d
Computer Programming for Biologists Oct 30 th – Dec 11 th, 2014 Karsten Hokamp  Fill out.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
1 N305 C Programming. 2 Objectives for the Lab ä Learn problem solving strategies ä Achieve intermediate knowledge of C Programming Language ä Gain experience.
Carnegie Mellon Linux Boot Camp Jenna MacCarley, Peter Pearson, Shashank Goyal 9/19/2015.
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
ENEE150 – 0202 ANDREW GOFFIN Introduction to ENEE150.
Setting up and getting going with…. MIT App Inventor.
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.
Introduction to Unix – CS 21 Lecture 4. Lecture Overview * cp, mv, and rm Looking into files The file command head and tail cat and more What we’ve seen.
BIF713 Basic Unix/Linux Commands Getting Help with Commands.
Introduction to C Programming Lecture 2. C Tutor Schedule / 3rd Floor Lab b The lab and tutor schedule is available at the following URL:
Welcome to CS323 Operating System lab 1 TA: Nouf Al-Harbi NoufNaief.net.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
CPSC 217 T03 Week I Part #2: Python Tricks for Exercise #1 Hubert (Sathaporn) Hu.
Intro to Programming Environment 1. Today You Will Learn how to connect to a machine remotely with “nomachine NX client” Learn how to create a new “source.
Unix Commands PowerPoint Presentation developed for LS 560 Information Technology online class - University of Alabama by Debey Sklenar TENacious Cohort.
1 Week 13 FAT32 Utility Operations Guide: rm and rmdir Classes COP4610 / CGS5765 Florida State University.
Manage Directories and Files in Linux Part 2. 2 Identify File Types in the Linux System The file types in Linux referred to as normal files and directories.
CPSC 217 T03 Week II Part #1: SimpleGraphics.py Hubert (Sathaporn) Hu.
CPSC 217 T03 Week VI Part #2: Midterm Review Session Hubert (Sathaporn) Hu.
COP3502: Introduction to Computer Science Yashas Shankar Lecture #2.
More Unix Naomi Altman. Directories Directory = folder mkdir - makes a new directory rmdir - removes an empty directory cd mydirectory - moves you into.
CPSC 217 T03 Week VI Part #1: A2 Post-Mortem and Functions Hubert (Sathaporn) Hu.
CPSC 217 T03 Week V Part #1: Iteration Hubert (Sathaporn) Hu.
ENEE150: Discussion 1 Section 0104/0105 Please Sit Down at a Computer and Login!
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
The Kernel At a high level, the kernel in an operating system serves as the bridge between applications and the actual data processing of the hardware.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
The Unix File sytem. Introduction Tree structure …
General Computer Science for Engineers CISC 106 Lecture 03 James Atlas Computer and Information Sciences 6/15/2009.
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Unix Lab Fall Shell Scripting ●Through the shell (LXTerminal) you can: ●Run programs. ●Interact with the file system. ●Change settings. ●Send/receive.
Assignprelim.1 Assignment Preliminaries © 2012 B. Wilkinson/Clayton Ferner. Modification date: Jan 16a, 2014.
Introduction to the Command Line for Data Analysts Gus Cavanaugh
First Day in Lab Making a C++ program
CS1010: Intro Workshop.
Department of Computer Engineering
Navigating the Filing System
UNIX The Basics Source:
3.4 User Interfaces This tutorial will give you a first-hand experience of: Navigating the directory structure in a CLI and an unfamiliar GUI Running the.
The Command Prompt Commands are the way to “do things” in Unix
Assignment Preliminaries
Intro to UNIX System and Homework 1
Module 6 Working with Files and Directories
CSCE 206 Lab Structured Programming in C
Presentation transcript:

CPSC 217 T03 Week I Part #1: Unix and HELLO WORLD Hubert (Sathaporn) Hu

About Me My name is Hubert (Sathaporn) Hu.  You should only call me Sathaporn if you know Thai… Otherwise, call me Hubert. My address is:  Please put CPSC217 in ’s subject I also have website:  The course material is also available here!

Today’s Tutorial Tips! Installing Python Terminal 101 Changing Password Hello World!

Tips! To help you survive university, I have some tips for you! 1.Your TA is also a student. So he probably doesn’t know everything. 2.Your TA is also busy, so he might be not able to help you with everything. (This also means don’t leave your questions until the day before the assignment is due!) 3.University is FAST & FURIOUS! So get familiar with your class content now! You are also expected to know the materials more thoroughly!

Installing Python Please install Python 3 (AND NOT VERSION 2+) on the machine. If you are using the lab’s computer, Python 3 is already installed. Each platform handles the installation differently, so I suggest that you look into Python’s website for it.

Terminal 101 From what I heard from your instructor, most of you haven’t attended the block week class that will teach you how to use Unix… Which is a shame… However, the instructor has asked me to teach the basic of shell scripting. Terminal 101 won’t show up in your exam, so don’t worry about it too much. This tutorial covers this topic very shallowly though, so it helps if you do more self-studying on it.

Terminal 101 To get started, open your terminal.  If you’re using Windows, you can open Powershell. Then you will greeted with an unfriendly screen with something like this:...stuffs...>

Terminal 101: pwd In your terminal, you will be positioned inside a folder … normally in your root or your user folder. The current directory is indicated in …stuffs…...stuffs...> There is also a handy program called “pwd” that displays your current directory. EXERCISE: type pwd to see what happens.

Terminal 101: dir/ls If you want to know the directories, use “dir” “ls” will list all files in the directory. EXERCISE: type dir then ls to see what happens. These programs also take an argument as well. So if you have a folder named “Folder” using “dir Folder” will shows directories inside “Folder.” EXERCISE: execute dir with a valid folder and then ls with a valid folder.

Terminal 101: cd Well, you can see the folders, but what about accessing it? Use cd! EXERCISE: Use cd into a folder listed by dir. If you need to backtrack, then type “cd..” EXERCISE: Backtrack by typing “cd..” TIPS: You can also cd directly into a folder by execute cd with the folder’s path.

Terminal 101: mkdir/rmdir You can also make a folder as well. Use “mkdir” to create a new one. Use “rmdir” to delete it! EXERCISE: Make a new folder with mkdir and delete it with rmdir. DANGER: Deleting a folder through terminal doesn’t move it to a Trashcan. Rather, the whole folder is gone FOREVER! TIPS: rmdir will only delete empty folder. You must empty the folder’s content first.

Terminal 101: rm If you want to delete a file, use rm to eliminate it. EXERCISE: Type “touch garbage.txt” to create an empty file and then delete it. DANGER: rm doesn’t move the file into the Trashcan! So if the file is deleted through rm, it’s pretty much gone! TIPS: rm may ask you whether you’re really sure or not. Type Y to proceed, N to cancel!

Terminal 101: Executing a program If you want to execute a file, simply type its path into the Terminal. TIPS: Sometimes, the file can be locked! I won’t go into the detail on how to unlock it. Certain programs can be opened just by typing its name, so you don’t need to know its path.  Examples are: dir, ls, cd, mkdir, rmdir, rm, python, … If you don’t know how to use a program, then open it with --help. EXERCISE: Try getting help for ls.

Changing your password! Some of you may not have changed your password for your UCalgary IT account. So after class, please use this terminal program passwd on a computer in the lab to change it! Of course, if you don’t know how to use passwd, use passwd --help or Google! Seriously, you must be good at Googling stuffs if you want to survive computer science!

Hello World! EXERCISE: Make a Python program that prints Hello World! on to the screen in a text editor of your choice. HINT: You only need one line! To execute this code, you must go use Terminal to run a program named python using the path of the program as a parameter. EXTENDED EXERCISE: Complete Exercise #1 given by your instructor.