1 / 28

Lecture 2: Get Started ( ch 2)

Lecture 2: Get Started ( ch 2). IT244 - Introduction to Linux / Unix Instructor: Bo Sheng. Outline . Login to server Working with the shell. Login to Server. Server (hostname): it244a.cs.umb.edu it244b.cs.umb.edu SSH (Secure Shell, no more telnet )

metea
Download Presentation

Lecture 2: Get Started ( ch 2)

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 2: Get Started (ch 2) IT244 - Introduction to Linux / Unix Instructor: Bo Sheng

  2. Outline • Login to server • Working with the shell

  3. Login to Server • Server (hostname): • it244a.cs.umb.edu • it244b.cs.umb.edu • SSH (Secure Shell, no more telnet) • Use terminal (Linux/Mac OS clients) • Use other software tool (Windows client)

  4. Login to Server • Server (hostname): • it244a.cs.umb.edu • it244b.cs.umb.edu • SSH (Secure Shell) • Use terminal (Linux/Mac OS clients) • Use other software tool (Windows client) • PuTTY • Instructions on course web page http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

  5. Login to Server • If you haven’t got an account • http://www.cs.umb.edu/sp/resources/other/faqs/#FAQ02 • If you haven’t register you account with this class

  6. Login to Server • If you haven’t register you account with this class

  7. Login to Server • If you haven’t register you account with this class

  8. Login to Server (Windows) • PuTTY

  9. Login to Server (Windows) • PuTTY

  10. Login to Server • SSH (Secure Shell) • Use a terminal (Linux/Mac OS clients)

  11. Login to Server • Open a terminal in Ubuntu

  12. Login to Server • SSH (Secure Shell) • Use terminal (Linux/Mac OS clients) • sshusername@hostname • ssh –l username hostname e.g., • ssh shengbo@it244a.cs.umb.edu • ssh –l shengbo it244a.cs.umb.edu

  13. Login to Server (Linux / Mac) • Terminal

  14. Login to Server (Linux / Mac) • Terminal

  15. Outline • Login to server • Working with the shell • Basic file operations • Editing command lines • System info/settings • Help and documents • Everything is case sensitive

  16. Basic File Operations • List files ( ls ) • ls • pwd(print working directory) • ls / • ls /home (see your username?) • ls /home/shengbo/it244

  17. Basic File Operations • Change directory ( cd ) • cd / • ls • pwd • cd /home/your username/it244 • ls • pwd

  18. Basic File Operations • Read files ( cat ) • cat /home/shengbo/it244/welcome • cat /etc/motd • Some files are not readable (e.g., binary) • cat /bin/cat

  19. Basic File Operations • Write/create files ( echo ) • ls • echo “hello world” > hello • ls • cat hello • echo “I am your name” >> hello • cat hello • cat hello hello

  20. Basic File Operations • Execute files • /home/shengbo/it244/exetest • Abort execution • CTRL+C • CTRL+Z and kill • /home/shengbo/it244/exetest • CTRL+Z • jobs • kill %1 • jobs

  21. Editing Command Lines • Delete a char • “backspace” and “delete” • Delete a word ( CTRL+W ) • Delete a line ( CTRL+U ) • Arrow keys • Up / down: browse the command history • Left / right: move the cursor

  22. System info/settings • Which shell we are using? • ps • What OS is running? • uname • Change your passwd • passwd • Something you can’t do (su/sudo) • Try to create a file under /

  23. Help and Documents • --help option • System manuals ( man) • man ls • man cat • man ssh • man man

  24. Help and Documents • --help option • System manuals ( man) • man ls • man cat • man ssh • man man • Reading long manuals • Press ENTER, SPACE, and Q

  25. Help and Documents • GNU info / pinfo(menu display) • info ls • info cat • info info • Search Keyword • man –k • apropos • whatis

  26. Summary • File operations • ls, pwd, cd, cat, echo • CTRL+C, CTRL+Z, kill, jobs • System info • ps, uname, passwd • Help and documents • man, info, apropos, whatis

  27. Questions • Use man and info to read the manual of ls and find out how to distinguish files from directories. • uname can display a lot more system information. Find a way to display the OS “kernel name” and “kernel release”. The expected output is “Linux 3.2.0-36-generic”

More Related