CSE4251 The Unix Programming Environment Spring 2015 Instructor: Mai Zheng
About the Class Level and Credits: U1 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 Satisfactory/Unsatisfactory 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/cse4251sp14/index.htm
About the Instructor Mai Zheng Office hours & location More info. Ph.D. candidate in CSE department zheng.536@osu.edu Research area: Systems Office hours & location Monday 4:00 pm - 5: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? used vim/emacs? used 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 One of the Creators of UNIX, Dennis Ritchie , is the creator of C
What is Unix Was an operating system Is an OS family/specification 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. One of the Creators of UNIX, Dennis Ritchie , is the creator of C
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) Why Not C shell An enhancement for the original Bourne shell (sh) Default shell on most Linux distributions Why Not C shell Csh Programming Considered Harmful Top Ten Reasons not to use the C shell Csh 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: ssh username@stdlinux.cse.ohio-state.edu Windows: run PuTTY.exe Copy files between server and your computer Linux: scp somefile username@stdlinux.cse.ohio-state.edu:/somedirectory Windows: run WinSCP.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