Unix Survival Guide - PowerPoint PPT Presentation

About This Presentation
Title:

Unix Survival Guide

Description:

( Solaris, HP/UX, Ultrix, Linux, FreeBSD, etc. ... A lot of servers are Unix-based. ... Assembler / Debugger: as, ld, gcc, gdb. Which computer you can use ? ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 20
Provided by: cpEngC
Category:

less

Transcript and Presenter's Notes

Title: Unix Survival Guide


1
Unix Survival Guide
2
What is Unix ?
  • Very popular OS. (Solaris, HP/UX, Ultrix, Linux,
    FreeBSD, etc.)
  • Being used in many medium-end/high-end servers.
  • Very stable, flexible, portable.

3
Why do you need to care ?
  • Good question! It is Windows world anyway.
  • WRONG!
  • A lot of servers are Unix-based.
  • Unix is older than Windows but yet it still has
    the old basic concepts.
  • Unix is considered to be cleaner than Windows
    in term of coding.
  • Unix is still more secured than Windows.
  • Most of network devices are Unix-based (e.g.
    routers, caches, mail servers, security servers).
  • You can find a job with good pay with Unix.

4
Unix History
  • Born in 1969 as a child of project called
    Multrics (by Bell Labs, GE, and MIT).
  • Its famous parents Ken Thompson and Dennis
    Ritchie.
  • Its famous sibling (and supporter) C language
    (by Brian Kennigan and Dennis Ritchie).
  • First machine DECs PDP-7.
  • First game on Unix space travel.
  • Famous game on early Unix rogue.

5
Unix Features
  • Why is it so popular ?
  • Multitasking.
  • Multiuser.
  • Portability.
  • Network applications.

6
Basic Skills for this Class
  • Basic Unix operations login, logout, directory
  • Basic Unix commands man, ls, cd, pwd, rm, mv,
    cat, more
  • Editing commands pico, vi
  • Assembler / Debugger as, ld, gcc, gdb
  • Which computer you can use ?
  • Remote login (using telnet or secure shell).
  • cpu200, zeus, and athena.

7
Basic Unix Operations
  • Start using the system login
  • login natawut
  • Password
  • Last login Mon Aug 12 223702 from
    zeus.cp.eng.chula
  • Quitting from the system logout
  • logout
  • ALWAYS LOGOUT !!!
  • Can use exit or CTRL-D.

8
Editing Keys
  • When entering a command at the shell prompt
  • erase one character ctrl-H / backspace
  • erase the whole line ctrl-U
  • stop execution ctrl-C
  • pause output to the screen ctrl-S
  • resume after a pause ctrl-Q

9
Directory Structure
  • All files are organized in (sub)directory
    (folders).
  • hierarchy current directory, parent directory,
    root directory
  • path reference absolute, relative

10
Basic Unix Commands
  • Getting help man (manual)
  • man ls
  • man man
  • format man ltcommandgt

11
Basic Unix Commands (cont)
  • Listing all the files ls
  • ls
  • Admin Class bin
    public_html
  • options ls -l, ls -a, ls -al, ls ltdirectorygt
  • ls l Class
  • ls al ..
  • format ls -laCFR ltdirectorygt

12
Basic Unix Commands (cont)
  • Understand permissions
  • ls -l
  • total 168
  • drwxr-xr-x 3 natawut faculty 4096 Aug 5
    1624 Class
  • drwxr-xr-x 2 natawut faculty 4096 Jul 10
    0025 Images
  • drwxr-xr-x 2 natawut faculty 4096 Jul 10
    0025 Library
  • drwxr-xr-x 8 natawut faculty 4096 Jan 26
    2002 Old
  • drwxr-xr-x 2 natawut faculty 4096 Aug 5
    1609 Publications
  • drwxr-xr-x 2 natawut faculty 4096 Aug 1
    0104 Templates
  • -rw-r--r-- 1 natawut faculty 4800 Aug 1
    0105 class.html
  • -rw-r--r-- 1 natawut faculty 4551 Aug 1
    0117 contact.html
  • -rw-r--r-- 1 natawut faculty 5817 Aug 1
    0121 home.html
  • -rw-r--r-- 1 natawut faculty 3343 Feb 19
    1715 index.html
  • ...

13
Basic Unix Commands (cont)
  • Finding out where I am pwd (print working
    directory)
  • pwd
  • /home/natawut
  • Walking around cd (changing directory)
  • cd Admin
  • pwd
  • /home/natawut/Admin

14
Basic Unix Commands (cont)
  • change to parent directory, root directory.
  • pwd
  • /home/natawut/Admin
  • cd ..
  • pwd
  • /home/natawut
  • cd /
  • pwd
  • /
  • cd
  • pwd
  • /home/natawut

15
Basic Unix Commands (cont)
  • change to absolute path, relative path.
  • pwd
  • /home/natawut
  • cd public_html/Class
  • pwd
  • /home/natawut/public_html/Class
  • cd /usr
  • pwd
  • /usr
  • cd
  • pwd
  • /home/natawut
  • cd ../../usr
  • pwd
  • /usr

16
Basic Unix Commands (cont)
  • Deleting stuffs rm (remove)
  • rm hw1.asm
  • Changing a files name / Moving things around mv
    (move)
  • mv hw1.asm h1.abc
  • mv h1.abc Class
  • mv h1.abc Class/hw1.txt

17
Basic Unix Commands (cont)
  • Displaying files content cat
  • cat hw1.asm
  • A better version than cat more
  • more hw1.asm

18
Editing Files in Unix
  • Several editing programs pico, vi, emacs
  • Simple editor pico
  • Available only on cpu200.
  • Similar to Notepad program on Windows.
  • For advance users vi and emacs

19
References
  • man pages.
  • Grace Todino et. al., Learning the UNIX Operating
    System, OReillyAssociates, Inc.
  • Other Unix books.
  • Links in my homepage.
  • http//www.cp.eng.chula.ac.th/natawut
Write a Comment
User Comments (0)
About PowerShow.com