210 likes | 451 Views
CSE4251 The Unix Programming Environment. Autumn 2014 Instructor: Mai Zheng. Recap: Log into shell. Connect to a remote Linux server from Linux: ssh username@stdlinux.cse.ohio-state.edu from Windows: run PuTTY.exe What if I don’t have access to a Linux server?
E N D
CSE4251 The Unix Programming Environment Autumn 2014 Instructor: Mai Zheng
Recap: Log into shell • Connect to a remote Linux server • from Linux: sshusername@stdlinux.cse.ohio-state.edu • from Windows: run PuTTY.exe • What if I don’t have access to a Linux server? • Install Linux on your own machine • Install Linux on a virtual machine on your own machine • E.g., Install VirtualBox, then install Ubuntu in VirtualBox
About the Class • Entry-level introduction to Unix environment • interactively use shell (command line interface & basic commands) • efficiently use shell (bash scripting , grep, sed, awk, etc.) • edit your programs (vim/emacs) • compile your programs (makefile) • version-control your programs (git) • visualize your data/results professionally (gnuplot) • others • Level and Credits: U1
About the Class • No textbook required • Grading • pass/fail • 5 labs • 100 points total (20 points each) • 70 points required to pass • Late penalties: 1 day = 10%, 2 days= 25%, 3 days = 50%, > 3 days = 100% • More info. • http://web.cse.ohio-state.edu/~zhengm/teaching/cse4251au14/index.htm
About the Instructor • Mai Zheng • Ph.D. candidate in CSE department • zheng.536@osu.edu • Research area: Systems • Office hours & location • Monday 1:00 pm - 2:00 pm, or by appointment • Bolz Hall 109 • More info. • http://web.cse.ohio-state.edu/~zhengm
About You • Name, grade, department • Unix experience • your strongest programming language? on which OS? • programmed on a shell? your editor (e.g., vim/emacs) ? • written a makefile? • Why do you choose this class
Outline • Brief introduction of the class, instructor, and yourself • Brief introduction of Unix • What is Unix? • Why Unix? • What is shell and why bash? • Get ready for your Unix journey
What is Unix • Was an operating system • Originally developed by Bell Labs around 1970 • epoch time: number of seconds elapsed since 00:00:00 (UTC), Thursday, 1 January 1970. • Ancestor of many modern operating systems • Linux (Ubuntu, Red Hat, Debian, Android, etc. ), Mac OS, FreeBSD, Solaris, etc. • http://en.wikipedia.org/wiki/File:Unix_history-simple.svg
What is Unix • Was an operating system • Originally developed by Bell Labs around 1970 • epoch time: number of seconds elapsed since 00:00:00 (UTC), Thursday, 1 January 1970. • Ancestor of many modern operating systems • Linux (Ubuntu, Red Hat, Debian, Android, etc. ), Mac OS, FreeBSD, Solaris, etc. • http://en.wikipedia.org/wiki/File:Unix_history-simple.svg • Is an OS family/specification • Not a single OS named “Unix” • but OSes could earn “UNIX certification” • Many “Unix-like” OSes • Including most popular modern OSes except for Windows
Why Unix • Powerful: designed for programmers • build new tools easily and efficiently • customize the user interface • string together a series of commands to create new functionality • create custom commands that do exactly what we want
Why Unix • Powerful: designed for programmers • build new tools easily and efficiently • customize the user interface • string together a series of commands to create new functionality • create custom commands that do exactly what we want • Widely used in academia and industry • OSU CSE department • Google, HP Labs, VMWare, Amazon, etc.
Why Unix • Powerful: designed for programmers • build new tools easily and efficiently • customize the user interface • string together a series of commands to create new functionality • create custom commands that do exactly what we want • Widely used in academia and industry • OSU CSE department • Google, HP Labs, VMWare, Amazon, etc. • Open-sourced descendants allow us to learn a lot • Linux, FreeBSD, Android, etc.
What is Shell • A command interpreter that turns the text that you type (at the command line) into actions • was the only interface to access an OS before the graphic-user-interface (GUI) was invented • essentially a process • user mode • kernel mode
What is Shell • Two main flavors of Unix Shells • Bourne shell (or Standard Shell): sh, ksh, bash, zsh • Originally developed at Bell Labs • $ for command prompt by default • C shell : csh, tcsh • Originally developed at Berkley • % for command prompt by default
What is Shell • Two main flavors of Unix Shells • Bourne shell (or Standard Shell): sh, ksh, bash, zsh • Originally developed at Bell Labs • $ for command prompt by default • C shell : csh, tcsh • Originally developed at Berkley • % for command prompt by default • To check your current shell • $ echo $SHELL
Why bash • Bash: Bourne-again shell (for this course) • An enhancement for the original Bourne shell (sh) • Default shell on most Linux distributions
Why bash • Bash: Bourne-again shell (for this course) • An enhancement for the original Bourne shell (sh) • Default shell on most Linux distributions • Why Not C shell • CshProgramming Considered Harmful • Top Ten Reasons not to use the C shellCsh problems
Outline • Brief introduction of the class, instructor, and yourself • Brief introduction of Unix • What is Unix? • Why Unix? • What is shell and why bash? • Get ready for your Unix journey
Get ready for your Unix journey • Connect to CSE Linux server with your CSE account • Linux: sshusername@stdlinux.cse.ohio-state.edu • Windows: run PuTTY.exe • Copy files between server and your computer • Linux: scpsomefileusername@stdlinux.cse.ohio-state.edu:/somedirectory • Windows: run WinSCP.exe