Comprehensive System Administration
Lecture 2 notes:
getting an OCF account:
Hopefully you've already gotten an OCF account. This course will be taught on the Open Computing Facility's hardware. If you don't have an OCF account already, you'll need to sign up for one. You should have done this on the first day of class. If you missed it you can do it anytime a staff member is around. You can go to this page to get the new account form if you'd rather print it and fill it out at home although we usually have copies in the lab.administrivia:
Taking this class for units: Try to sign up officially before this Friday. To get a signiture, stop by the lab on Thursday afternoon before 6pm, or bring your add form to class if you want to wait until the last minute. Any class instructor can sign the form, but try to find Gabe or Devin. We don't mind if you just want to audit the class. Class This Friday: The lab may be closed this Friday, as Heller Lounge will be closed from Thursday evening until next Tuesday. Our staff will try to open the lab, you may need to walk around to the back door to get in if the front door is locked. In future weeks, we may move the class to a real classroom, because hands on computer use will not always be necessary. Units: variable (1-3) Questions?course material:
Today we will focus on getting everyone up to speed on basic unix commands, and redirection. If there is time, you should investigate file editors, and email programs. You should use the class time to find peers that have more knowledge than you in certain areas, and who you can go to for advice and guidance. Steve and Gabe will be leading the class, there will also be other instructors around and available to help. Below is a list of basic unix commands we think you should be familiar and comfortable with. These links can help you find information about any commands you don't know already. You can also try asking your peers, or an instructor. Some hints on getting more information and explanations about unix commands Google Search for "frequently used unix commands" LLNL's Quick Reference of Frequently used Unix Commands Very basic unix commands...
- ls
- cp, mv, rm
- chmod, chown, chgrp
- cd, pwd
- mkdir, rmdir, ln
- cat, more, less, head, tail
- man, apropos
- sort, uniq, wc, grep
- vi, pico, emacs
- date, cal
- pine, elm, mutt, mail
- telnet, rlogin, ssh
- ftp, scp
- w, who, finger, talk, nwrite
- hostname, whoami, set, history
- passwd, quota -v, du
- lpr, lp
- ps, kill
- find, locate, which
- exit redirection >, >>, <, |
- > send output to file: ls > directory-listing
- >> append output to end of file (don't overwrite file)
- < send a file as input to a command: mail friend < filename
- | send output of one command to input of next command: ls -la | more
Homework
CSUA Help Sessions
Help Session Tutorials and Handouts
Online help files from the ME dept
Classes offered by Berkeley's IS&T staff
Help files on Socrates
Computer-Based Training in Management of Information Science (available from UCB hosts only)
If you are interested in running Linux at home, you should visit
CalLUG the Cal Linux Users Group.
They have meetings, and links to information about running Linux.
A brief description of different Linux distributions
Unix FAQFrequently Asked Questions from the comp.unix.questions newsgroup
Unix Sysadm Resources - another random source
E.g. looking for less, we see there are two commands called less, which I've
highlighted, one in section (1) and another in section (3).
% apropos less UNIVERSAL UNIVERSAL (3) - base class for ALL classes (blessed references) jpegtran jpegtran (1) - lossless transformation of JPEG files less less (3) - perl pragma to request less of something from the compiler cldap_close cldap_close (3n) - dispose of connectionless LDAP pointer cldap_open cldap_open (3n) - LDAP connectionless communication preparation cldap_search_s cldap_search_s (3n) - connectionless LDAP search cldap_setretryinfo cldap_setretryinfo (3n) - set connectionless LDAP request retransmission parameters min min (9f) - return the lesser of two integers less less (1) - opposite of more lesskey lesskey (1) - specify key bindings for less |
Since the manpage for less from section 3 didn't give us what we wanted to see, this suggests we look at the less manpage in the other section ("man -s1 less", even though the description "opposite of more" doesn't really explain anything.
It's also important to know that your shell has built in commands which will probably not have manual pages of their own. For example "man set" on the OCF will find the command "set" for the TCL scripting language, which is probably not what you want. If you type "which set" you will be told that set is a built-in shell command. To read about the set command, you will need to look at the manpage for your shell (e.g. "man csh"). This brings us to the problem of knowing what shell you are using. The most common default shells are sh, csh, bash, and less likely, tcsh or ksh. You can check your processes and find out which shell you are using, e.g. "ps" will give you something like:
% ps PID TTY TIME CMD 10380 pts/4 0:00 tcsh 10362 pts/4 0:00 csh |
Man pages can be difficult to read, an require some getting used to. You can find information about many commands online. Try a google search for "unix command foo" if the manpage is unhelpful to you.
There are some useful unix books out there. In particular the O'Reilly & Associates "Unix in a Nutshell" is said to have a reasonable level of information about commands, while not being as confusing as a manpage.
The System Administrator's Guild - SAGE, a professional organization for SysAdmins
Slashdot - news of interest to the geek community
User Friendly - a comic about a software company
Cyberspace Atlas - interesting information with a cheesy name