An Introduction to UNIX……………..Sept 12, 2005……………Instructional Lab…………by Emily

 

  1. unix basics
    1. Your home directory: /homes/metogra/blauman, also ~blauman
    2. Tricks

                                                               i.      copy and paste with center mouse button

                                                             ii.      tab to complete a filename

    1. Basic commands

­          example: mv schnookums fuzzy/wuzzy/.

­          example: cp ~blauman/puppy.jpg .

    1. Help: type “man command
    2. Wildcard: “*” example: mv *bears.doc animals/big/furry/.
    3. Running a process in the background: “process &  (e.g., “firefox &”)

 

  1. Printing
    1. Graphics (ps): lpr –Pprintername filename   (must open jpg etc in a viewer, e.g. web browser)
    2. Text: enscript –Pprintername filename
    3. Text on 2 pages with title: enscript -Pprintername -2 --fancy-header=a2ps -r -h filename
    4. The printers

­          instlab            instructional lab (please watch for infinite copies!)

­          mp1            black-and-white in small lab

­          color            color printer in small lab

 

  1. Changing permissions
    1. Use “ls –l” to see the permissions you have set

­          drwxr-xr-x   1   username     meto      1245 Sept 5 11:10  bubbles           

    1. Three letters:

                                                               i.      r = read

                                                             ii.      w = write

                                                            iii.      x = execute

    1. Three groups:

                                                               i.      first three letters are for the user

                                                             ii.      second three are for the group (e.g. everyone in AOSC)

                                                            iii.      third three is for others

    1. Changing the permissions

                                                               i.      chmod ### filename

                                                             ii.      all are combinations of 4 (read), 2 (write), and 1(execute)

­    7 = all permissions

­    6 = read and write

­    5 = read and execute

­    4 = read only

­    3 = write and execute

­    2 = write only

­    1 = execute only

    1. Examples

­    “chmod 777 bubbles” gives rwxrwxrwx permissions

­    “chmod 751 bubbles” gives rwxr-x--x permissions

­    “chmod 711 bubbles” gives rwx--x--x permissions

­    “chmod 755 bubbles” gives rwxr-xr-x permissions

 

 

  1. Text editing
    1. if you are on a computer that supports it:  nedit filename &
    2. VI

                                                               i.      vi filename

                                                             ii.      cp ~gcm/vi_exercise.txt .

                                                            iii.      http://www.helpdesk.umd.edu/documentation/unix/vi.shtml

 

  1. Working from home
    1. http://www.atmos.umd.edu/~helper/GettingStarted/GettingStarted_Login.html
    2. ssh to wam.umd.edu, then ssh youratmosusername@nimbus14.umd.edu
    3. X windows