Introduction to Instructional Computing at UCB - PowerPoint PPT Presentation

About This Presentation
Title:

Introduction to Instructional Computing at UCB

Description:

Computer Science Undergraduate Association. Spring 2006. About this presentation ... Computer Science Undergraduate Association. Spring 2006. Email. From an ... – PowerPoint PPT presentation

Number of Views:272
Avg rating:3.0/5.0
Slides: 46
Provided by: Jeffrey7
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Instructional Computing at UCB


1
Introduction to Instructional Computing at UCB
  • How to avoid the wrath of root
  • Or how I learned to stop worrying and love the
    command line

Presented by the CSUA http//csua.berkeley.edu
2
About this presentation
  • Quick overview of the basics
  • Some things you will know, some things you will
    not know.
  • Slides will be posted on the CSUA website
  • Divided into two sections
  • Part 1 Instructional resources
  • Part 2 Basic basic basic UNIX

3
Dont be embarrassed...
  • You are not expected to know any of this
    information coming into Berkeley, but any CS
    class you take will depend on it
  • Dont be afraid to ask questions
  • You can ask in private
  • CSUA Office 343 Soda
  • HKN UPE Office 345 Soda

4
Part 1
  • Instructional resources

5
What is Instructional Computing
  • Collection of servers, labs, and resources to
    help you do your work
  • If in doubt, you can visit http//inst.eecs.berkel
    ey.edu and find the answer to almost everything!

6
Where are the computers?
  • Instructional labs that are open to everyone
    (need a card key after 630pm and weekends)
  • UNIX 271 Soda, 273 Soda, 275 Soda, 277 Soda
  • Windows 330 Soda
  • Windows passwords are not in sync with UNIX
    passwords, you must use your default password
    from your form to login
  • Mac OSX 199 Cory
  • http//inst.eecs.berkeley.edu/clients
  • Other labs are reserved for specific courses
  • Printers are in or near each of these labs
  • Class accounts have a printing quota

7
Some rules for the labs...
  • No food or drink in the labs
  • Be courteous to your fellow students
  • Do not unplug anything
  • Dont be a hoser
  • No games, chat, etc during peak usage times
  • Read your account form!

8
Arent there labs with(lower-case-w) windows?
  • The CSUA lounge has windows, radiation-ball-produc
    ed lighting, couches, and computers. And you can
    eat and buy cheap snacks in the CSUA office next
    door!
  • Location 337 Soda
  • Login as user xterm, password xterm, then
    choose the instructional server youd like to
    login to and use your class account login.

9
Be not afraid...
  • Dont be afraid of the console
  • There is more to life than the mouse
  • Like it or hate it, youll have to learn it
  • There are a lot of resources to help you
  • You cant destroy the computers, just your own
    work

10
Working from home
  • You must use a secure transport to connect to
    Berkeley
  • Remote console/text access
  • SSH (Secure Shell) A secure equivalent of
    telnet
  • Remote file access
  • SCP (Secure Copy) A secure equivalent of remote
    copy
  • SFTP (Secure FTP) A secure equivalent of,
    surprise, FTP!
  • Remote graphical access
  • X/Windows run applications on the server and
    export the display, directly analogous to the
    console paradigm above
  • Popular versions of the above class of software
    are available at http//software.berkeley.edu

11
SSH
  • This will be the primary way you connect to
    Berkeley. It will dump you out at a command line
    on the remote server.
  • The version _at_ software.berkeley.edu has
    integrated file transfer and is easy to use
  • Demo
  • Some people find the above tool to be unstable
    and/or generally prefer Putty
    (www.chiark.greenend.org.uk/sgtatham/putty)

12
Login Servers
  • Popular login/project servers
  • pentagon.cs.berkeley.edu (Solaris/Intel)
  • po.eecs.berkeley.edu (Solaris/Intel)
  • rhombus.cs.berkeley.edu (Solaris/Intel)
  • nova.cs.berkeley.edu (Solaris/Sparc)
  • star.cs.berkeley.edu (Solaris/Sparc)
  • solar.cs.berkeley.edu (Solaris/Sparc)
  • http//inst.eecs.berkeley.edu/clients

13
Remote X/Windows
  • This gives you a graphical shell and allows you
    to run windowed applications
  • The apps run on the server only the UI is
    exported to you
  • If you can avoid using it, do so
  • Its big, its slow, and its a resource hog
    (both for you and the network)
  • But sometimes you absolutely have to...
  • Exceed is the tool that UCB provides

14
Working from home
  • More software (mostly class-specific) at
    http//inst.eecs.berkeley.edu/instcd
  • Emacs, STk, perl, putty, cygwin, etc.
  • Check with your TA to ensure that the
    class-specific files are up-to-date for your class

15
Transferring files
  • Your computer lt-gt Berkeley
  • SSH Secure Shell use the integrated client
  • Putty pscp.exe
  • Server lt-gt Server
  • scp ltsourcegt ltdestinationgt
  • source/dest of form login_at_serverfile (or dir)
  • e.g. scp myfile cs200-xx_at_po.eecs.berkeley.edusrcf
    iles
  • Also sftp an interactive shell like FTP

16
Email
  • Checking on the server, while connected...
  • pine, mutt, etc.
  • Forwarding elsewhere...
  • Put the email address you want to forward to into
    a .forward file in your home directory

17
Email
  • From an email client off campus
  • Uses IMAP rather than POP3
  • Your email client must support SSL (port 563)
  • Server imail.eecs.berkeley.edu
  • http//inst.eecs.berkeley.edu/share/b/pub/email.he
    lp
  • From the intarweb
  • http//imail.eecs.berkeley.edu

18
Newsgroups
  • From any on-campus computer (including the dorms)
  • Set your news/nntp server to news.berkeley.edu
  • From off campus
  • Server authnews.berkeley.edu
  • Requires SSL (port 563), no SPA
  • Use your Calnet ID for authentication

19
Newsgroups
  • On teh intarweb
  • http//inst.eecs.berkeley.edu/webnews
  • Use your instructional login

20
Web pages
  • If your class requires a web page all you need to
    do is to create a directory called public_html in
    your home directory
  • chmod 711 (drwxx--x) to make it world viewable
  • You can access your new site in the form of...
  • http//inst.eecs.berkeley.edu/username/
  • Cannot use tools that publish to the web
  • Class accounts are not for personal pages
  • They also get wiped after each semester

21
Disk space
  • Check quota regularly!
  • You can only be over soft for 7 days
  • Once you hit hard you must clean up
  • Things that tend to fill your quota fast
  • core files
  • Media and archives (.zip, .mp3, .avi, etc)
  • inst will be very unhappy to find these...
  • Intermediate compiler files (.o, etc)
  • Disgruntled root

22
Disk space
  • If you are over quota
  • You will have problems writing files
  • You may have problems logging in
  • If you cant login or write because of quota
  • Delete files!
  • SSH or SFTP in and delete files
  • Use FAILSAFE on instructional machines for
    login type and delete files (on Sunrays)

23
More disk space... really...
  • There is a land called /home/tmp
  • Medium-term storage, not for hosing
  • Use mkhometmpdir to create a space writable by
    you
  • Can only be done once per account
  • Instructional monitors this directory for hozers

24
Logout!
  • Please remember to log out of a computer you are
    done with
  • Sunrays Right click on the desktop
  • Windows Start ? Shut Down ? Logout
  • MacOSX Apple ? Logoff
  • Console exit
  • TIP Dont leave until you see the login screen!

25
Windows accounts
  • Do not store your data on your desktop!
  • Do not store your data in My Documents!
  • Use your home directory
  • Anybody taking EECS courses can get a windows
    account. Just run newacct.

26
Getting help (in this order)
  • RTFM (Read The Fantastic Manual)
  • man is your friend
  • apropos is not just a French word
  • Google knows all, and then some
  • Read insts help repository at http//inst.eecs.be
    rkeley.edu
  • Ask the person next to you
  • Drop by the root cave (666 2 Soda)
  • Inst_at_eecs.berkeley.edu, NOT root!!!
  • Come talk to us in 343 Soda! )

27
If something seems wrong ...
  • inst_at_eecs.berkeley.edu is the support email for
    the instructional environment. Make sure you
    include the following
  • Your login, computer, and lab
  • What you were doing and what the error is
  • What instructions you were trying to follow
  • Has it ever worked before?
  • And for problems from home, add the following
  • What operating system you are using
  • How the computer is connected to the Internet

28
Part 2
  • Basic basic basic UNIX

29
Some notes
  • UNIX doesnt always make sense at first
  • UNIX programmers hate vowels
  • UNIX is CaSe SeNsItIvE

30
Getting Help
  • man MANual page (called man pages)
  • Exstar gt man mkdir
  • Exstar gt man man
  • apropos With regard to searches commands
  • Exstar gt apropos directory

31
Moving around
  • pwd Tells you your current directory
  • Exstar gt pwd/home/cc/cs61a/su05/class/cs61a-x
    x
  • cd Change Directory
  • Exstar gt cd project1

32
Moving around
  • ls LiSts the files in the directory
  • Exstar gt lscore_at_ lab1 plural.scmdupls.scm pi
    gl.scm sumofsquares.scm
  • Exstar gt ls lab1part1.scm part2.scm

33
Directory management
  • mkdir Creates (MaKes) a directory
  • Exstar gt mkdir homework2
  • rmdir Deletes (ReMoves) a directory
  • The directory must be empty!
  • Exstar gt rmdir homework2
  • If you want to delete an entire directory tree...
  • star gt rm rf homework2
  • THIS IS A DANGEROUS COMMAND!!!!!

34
Files
  • touch creates an empty file
  • Exstar gt touch lab1.scm
  • rm ReMoves a file
  • Exstar gt rm lab1.scm

35
Files
  • mv MoVes a file
  • Also used to rename files
  • Ex (move)star gt mv part1.scm lab1dir
  • Ex (rename)star gt mv part1.scm
    oldbrokencode.scm
  • cp CoPies a file
  • Exstar gt cp part1.scm part1old.scm

36
Printing
  • lpr Line Printer (prints a text file)
  • Find the printer name on the printer or on the
    inst website
  • Exstar gt lpr P printer source.scm
  • enscript Converts a text file to a PS file
  • Our printers can print PS directly, with LPR
  • This tool allows you to change the font, print
    multiple pages per page, and control the output
    in more detail
  • See the man page for details

37
Printing
  • Be courteous manage your print jobs
  • Determine what is already on the queue
  • Ex star gt lpq Plw274
  • Cancel all your jobs
  • Ex star gt lprm a all

38
Editing Files
  • vi VIsual Editor
  • Exstar gt vi file
  • Exstar gt man vi
  • emacs The Beast, a powerful OSHHEditor
  • Exstar gt emacs directory
  • Both can be difficult to learn. The CSUA will
    host a complete info session on emacs Thursday!
    Other resources...
  • http//www.math.utah.edu/djohnson/reference/Emacs
    Refcard.pdf
  • http//www.csua.berkeley.edu/jrleek/emacs-basic.p
    pt
  • http//www.eng.hawaii.edu/Tutor/vi.html

39
File permissions
  • There are 3 kinds of people in this world
  • You (user)
  • Your friends (group)
  • Everybody else (other)
  • Each type of person is given (or denied)
    permissions to
  • read
  • write
  • execute

40
File permissions
  • Having execute permission for a file means that
    you can run that program
  • Having execute permission on a directory means
    that you can cd into it
  • Having read permission on a directory means
    that you can list the contents

41
File permissions
  • Changing the permissions
  • star gt chmod ltpermsgt ltfile or directorygt
  • User Group Otherrwx rwx rwx rwxrwxrwx42142142
    1rwxr-x--x 751

42
Login and user information
  • chfn Changes your profile information (allows
    you to have your real name displayed when people
    look who is online, essential for group work)
  • Expo gt chfn
  • finger Look up information on a user
  • Exstar gt finger cs61a-xx
  • who See who is online
  • Exstar gt who
  • A similar command is just w

43
UNIX on Windows!
  • There are several tools to bring the power of the
    UNIX environment to your Windows system. Cygwin
    is probably the best of them.
  • http//www.cygwin.com
  • Includes practically every UNIX tool and app
    available compilers, databases, web servers,
    etc!
  • Also includes a complete X/Server that you can
    use to connect graphically to campus
  • You cannot avoid becoming an expert on UNIX in
    your time here and Cygwin will help you master
    UNIX!

44
Remote source editing
  • For those of you in 61b, 61c, or upperdiv, JEdit
    is a powerful IDE for source editing and allows
    you to edit files over the network (using SFTP as
    a transport)
  • Most class projects require library-access that
    you cant get at home, so you need to work with
    the code on the server
  • Editing in the console gets old FAST!
  • http//www.jedit.org
  • Also install (from within the program) the FTP
    package

45
Questions?
  • Brought to you by the...
  • Computer Science Undergraduate Association
  • Sign up and become a member, its free and there
    are a ton of benefits! Check out our site!
  • http//csua.berkeley.edu
  • Office 343 Soda Hall
Write a Comment
User Comments (0)
About PowerShow.com