1 / 19

CSE4251 The Unix Programming Environment

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?

blanca
Télécharger la présentation

CSE4251 The Unix Programming Environment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSE4251 The Unix Programming Environment Autumn 2014 Instructor: Mai Zheng

  2. 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

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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.

  12. 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.

  13. 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

  14. 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

  15. 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

  16. Why bash • Bash: Bourne-again shell (for this course) • An enhancement for the original Bourne shell (sh) • Default shell on most Linux distributions

  17. 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

  18. 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

  19. 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

More Related