1 / 0

Lecture 1 - Intro

Lecture 1 - Intro. Course Overview Linux BASH Windows CMD/ Powershell CLI vs GUI Misc Useful Stuff. Operating System. Hardware – the physical components of a system Operating System - ??? Software – the programs we run. Operating System. Hardware – the physical components of a system

margo
Download Presentation

Lecture 1 - Intro

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. Lecture 1 - Intro Course Overview Linux BASH Windows CMD/Powershell CLI vsGUI Misc Useful Stuff
  2. Operating System Hardware – the physical components of a system Operating System - ??? Software – the programs we run
  3. Operating System Hardware – the physical components of a system Operating System – What is this? What does it do? Software – the programs we run
  4. Operating System It’s a program Essentially, allows users to run other programs More details later!
  5. Operating Systems DOS (“Disk Operating System”)* Windows: 3.1, 95, 98, NT, ME, XP, Vista, 7 *Not quite true
  6. Operating Systems DOS (“Disk Operating System”)* Windows: 3.1, 95, 98, NT, ME, XP, Vista, 7 Apple: Snow Leopard *Not quite true
  7. Operating Systems DOS (“Disk Operating System”)* Windows 3.1, 95, 98, NT, ME, XP, Vista, 7 Apple: Snow Leopard Linux: Ubuntu/Kubuntu, Red Hat, CentOS, Mandriva, etc, etc *Not quite true
  8. Operating Systems DOS (“Disk Operating System”)* Windows 3.1, 95, 98, NT, ME, XP, Vista, 7 Apple: Snow Leopard, iOS Linux: Ubuntu/Kubuntu, Red Hat, CentOS, Mandriva, etc, etc *Not quite true
  9. CLI vs GUI CLI “Command Line Interface” Text-based communication with operating system GUI “Graphical User Interface” Image-based communication with operating system
  10. CLIs Is this a CLI?
  11. CLIs THIS...is a CLI!
  12. CLIs Predate GUIs Text only No mouse! Still exist today! Why?
  13. CLIs Predate GUIs Text only No mouse! Still exist today! Still very useful
  14. GUIs
  15. GUIs More natural interface 2nd generation “point and click”* Raster-based feedback Images make sense to us New desktop managers removing menu-style interfaces *See “Samuel Colt”
  16. CLI vs GUI What can GUIs do that CLIs can’t do?
  17. CLI vs GUI What can GUIs do that CLIs can’t do? Nothing!
  18. CLI vs GUI What can GUIs do that CLIs can’t do? Nothing! All of this class can be done without a GUI.
  19. CLI vs GUI What can GUIs do that CLIs can’t do? Nothing! All of this class can be done without a GUI. 90%+ of this class should be done without a GUI.
  20. CLIs We will be using: BASH CMDPowershell
  21. Events Modern OSs are event-driven Keyboard presses Mouse clicks BOTH up and down clicks/presses
  22. Events Every event has a time-stamp….why?
  23. Events Every event has a time-stamp….why? So we can order our actions OS might have a queue built up Some events may need delayed action Etc, etc, etc
  24. Events Why record events? Actions! Every time YOU do something, you probably want the OS to do something.
  25. Desktop Environments Windows Various “Windows Explorer”s Linux KDE, Gnome, etc, etc OS-X Heck if I know…can probably run Linux DEs. CEG233: Introduction to Windows and Linux.
  26. Desktop Environments GUI interface to the OS “Same $#!7, different DE” Open folders Drag & drop Execute programs Change system settings Cut & paste Highlighting Etc, etc
  27. Shells CLI interface to the OS This is the one we care about Windows CMD, Powershell Linux cshell, rshell, BASH, etc
  28. Shells Windows CMD “Traditional” shell Powershell Newer shell PS scripting is much closer to BASH scripting
  29. Shells Linux sh: Bourne Shell ksh: Korn Shell rsh: Remote Shell csh: C Shell bash: Bourne-again Shell
  30. Directory Structure Dear students, Please give the bearded man a moment to draw pretty pictures. They will help you! Your Instructor
  31. Picture topics Root (of the file system) Explicit in Linux “Hidden” in Windows ‘C drive’ is NOT always the main drive (mine used to be ‘F drive’)
  32. Picture Topics PWD/CWD ‘Present’ or ‘Current’ Working Directory “Where am I at (in the tree)?”
  33. Picture Topics Absolute paths Explicitly state exactly where the file is Earth -> North America -> USA -> Ohio -> Dayton -> WSU -> Joshi Center -> JC182
  34. Picture Topics Relative paths Collectively agree that we’re in some spot, and go from there . -> Joshi Center -> JC182
  35. Picture Topics . “This” directory Used to execute commands in current directory (coming up later) .. Parent directory
  36. Mounting We rarely have just one storage unit CDs/DVDs More hard drives Thumb drives Network storage In order to access them, we need to add them to the tree
  37. Windows File System C:\Program Files C:\Program Files (x86) Where user programs are installed C:\Windows Where the OS and essential programs are
  38. Windows File System C:\Users & … C:\Documents and Settings Home Directories Your own “private” storage real estate. Each user account has one (by default) They might exist for users that don’t‘ Users can get deleted and still leave their home directory
  39. Linux File System /bin Contains commands useful to all users (cat, cd, echo, ls, …) /boot (Almost) everything needed to boot the OS /dev List of all devices on the system
  40. Linux File System /etc System configuration files /home Self-explanatory /lib Contains kernel modules and libraries needed by commands in /bin and /sbin
  41. Linux File System /media “New” mount point /mnt “Old” mount point /opt Intended for 3rd party software /proc Somewhat unique…ignore it Virtual file system in its own right
  42. Linux File System /root Home directory of ‘root’ account /sbin Commands used for administration /usr Contains user binaries, libraries, header files, help docs, etc There’s more in the weeds...
  43. Permissions Files Read: Can I see the contents? Write: Can I change the contents? Execute: Can I run the contents as a script or program? Not applicable to “data” files
  44. Permissions Directories Read: Can I list the names of the files in the directory? NO FURTHER INFO Write: Can I add/remove files to/from directory Execute: Can I list the directory and related info?
  45. Permissions: UGO User Who “owns” the file? Group What collection of folks allowed to do something with the file Other If you aren’t one of the above, you’re this one.
  46. ‘ls –l’ Example drwxr-xr-x 10 admirald7s Installers 4096 2011-10-12 11:33 jdk1.6.0_27
  47. ‘ls –l’ Example d ……………………...-> File type (in this case, a directory) Could be ‘-’, ‘d’, ‘c’, ‘l’, ‘b’ rwxr-xr-x ……………-> permissions User, then Group, then Others 10 …………………….-> Number of sub-directories and links admirald7s …………-> user Installers ……………-> group 4096 ………………..-> Size of directory Only things in the immediate directory (not recursive) 2011-10-12 11:33 …..-> Timestamp of last modification jdk1.6.0_27 …………-> Name of the file/directory
  48. Basic commands bash Bourne-Again Shell bg background cat show each file in sequence chmod change file permission chown change the owner of a file cmp compare two files df show mounted volumes, etc diff show differences between two files du show disk usage echo echo/print arguments given emacs the all-powerful text/binary editor env lists the current environment variables fg foreground file guess what kind a file is
  49. Basic Commands grep print lines matching a pattern kill kills a running program ln creates a link between two files; try ln –s ls list contents of directory; try ls –lisa ltrace show library calls made links WWW/News/Mail browser ps shows current processes set set/get the value of shell variables sftp transfer files securely to/from a remote machine source execute the commands in a file ssh remote login securely strace show sys calls made time times the following command
  50. Basic Commands top like ps, but with continuous updates umask get/set the file mode creation mask vi text editor w who is on the system wc word count, etc There are more! Green are easy commands Black are medium commands Red are commands that are or can be dangerous is you don’t know what you’re doing.
  51. Learning Basic Commands NEVER execute unknown commands Research the command first Use the man pages e.g., “man wc”, “man time”, or even “man man”
  52. Commands fodder Whitespace Spaces, tabs, etc Tokens Not for arcade games
  53. Environmental Variables Variables that help the OS PATH LD_LIBRARY_PATH USERNAME TEMP& TMP OS Etc No different than ‘int x = 5;’
  54. PATH ‘ls’ is just another program/script When we type ‘ls’, how does the system know where that command is?
  55. PATH ‘ls’ is just another program/script When we type ‘ls’, how does the system know where that command is? ‘PATH’ variable
  56. Misc Stuff I Forgot File extensions Windows uses them to determine file type Linux doesn’t care about them at all
  57. RVH’s Lab Disclaimer(s) Labs can be vague This is semi-intentional RVH will give piece-meal help You WILL have to figure things out on your own
  58. General Lab Requirements No output, no credit! Make it easy to figure out what text goes with which step
  59. Lab 2 Pre-Material Get a flash drive At least 4GB Empty (or with contents you don’t care about) If you come with a U3 drive, you will walk away with a non-U3 drive.
  60. Lab 1 Material By ‘use’, I mean ‘use in a meaningful way’. “.bashrc” does NOT exist on these systems until you create it.
More Related