100%(1)1 out of 1 people found this document helpful
This preview shows page 1 - 13 out of 33 pages.
System AdministrationIntroduction to UnixSession 2 – Fri 02 Nov 2007Reference: chapter 1, The Unix Programming Environment, Kernighan & Pike, ISBN 0-13-937681-XAlbert Lingelbach, Jr.[email protected]
History of UnixBegun in 1969 at Bell LabsTimesharing / MultiuserOne computer, many terminalsProgrammingTypesettingGroup Communication
The shell environmenttty (teletype) / terminaltext only24 lines, 80 columnsdefault shell: Bourne shellto open a tty: right-click on desktop, choose “Open Terminal”echoprint text to the ttytry: echo Hellowhat shell is running ?
Simple commandsbashcompatible with sh, added features:command history with up arroweditable command linebackspace (vs. delete)datesystem date and timewhowhat users are on the system
Flow Control charactersctrl-Cstop a running commandtry: troffctrl-S / ctrl-Qpause/unpause outputtry: countdown 1000end inputctrl-D
Command Arguments / Parametersmis-typed commandgold: not foundcommand arguments / parameterstry: who am itry: gold coins
User Communicationnewsget local system news (written by the system administrator)try: newswritewrite messages to another user on the system; like IM but localtry: pair offusing who, find userid of your partnerwrite userid(and your partner does same)exchange messages
Manual PagesYou have seen the following commands:datewhonewswriteshbashHow to find more about them ?command-?often returns a short command synopsismancommandreturns the complete manual page reference for the command
FilesAs in any computer system, data is stored in filesMost Unix files are (ASCII) textMany Unix commands manipulate text files
File Namingcase sensitivespaces are problematicdot and underscore are useful separators
File Commands – 1current (“working”) directorypwdprint the working directorylslist the files in the working directorycdpathchange the working directory