《aix系统应用基础》02usingthesystem.ppt
Copyright IBM Corporation 2008,Unit 2Using the System,Copyright IBM Corporation 2008,Unit Objectives,After completing this unit,you should be able to:Log in and out of the systemState the structure of AIX commandsExecute basic AIX commandsUse AIX commands to communicate with other users,Copyright IBM Corporation 2008,Logging In and Out,To Log in:To Log out:,login:team01team01s Password:(the password does not appear)$,$(or)$exit(or)$logoutlogin:,Copyright IBM Corporation 2008,Passwords,Creating or Changing:,$passwdChanging password for team01team01s Old password:team01s New password:Enter the new password again:$,Copyright IBM Corporation 2008,Command Format,AIX commands have the following format:$command option(s)argument(s),$ls$ls l$ls/dev$ls l/dev,Copyright IBM Corporation 2008,THERE ARE EXCEPTIONS!,Command Format Examples,WRONG:1.Separation:$mail-f newmail$who-u2.Order:$mail newmail-f$team01 mail$-u who3.Multiple Options:$who-m-u$who-m u4.Multiple Arguments:$mail team01team02,RIGHT:1.Separation:$mail-f newmail$who-u2.Order:$mail-f newmail$mail team01$who-u3.Multiple Options:$who-m-u$who-mu4.Multiple Arguments:$mail team01 team02,Copyright IBM Corporation 2008,The date and cal Commands,Checking the date:Looking at a month:Looking at a year:,$dateWed Nov 14 10:15:00GMT 2007$,$cal 1 2003 January 2003Sun Mon Tue Wed Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31,$cal 2007,Copyright IBM Corporation 2008,The clear,echo,and banner Commands,clear:Clears the terminal screenecho:Writes what follows to the screenbanner:Writes character strings in large letters to the screen,$clear,$echo Lunch is at 12:00Lunch is at 12:00$,$banner Hello,Copyright IBM Corporation 2008,Activity:Questions and Answers,Whats wrong with the following commands?$du-s k_$df-k_$du-a-k_Which command.changes your password?_.clears the screen?_.prints out the current system date?_.exits the current shell?_,Copyright IBM Corporation 2008,The who and finger Commands,Finding who is on the system:Finding who you are:Displaying information about the users currently logged on:,$whorootlft0 Sept 4 14:29team01pts/0Sept 4 17:21,$who am iteam01pts/0Sept 4 17:21$whoamiteam01,$finger team02Login name:team02Directory:/home/team02Shell:/usr/bin/kshOn since Mar 04 16:17:10 on tty3No Plan.,Copyright IBM Corporation 2008,Sending Mail,$mail team01Subject:MeetingThere will be a brief announcement meeting todayin room 602 at noon.Cc:$,$mail team20sys2Subject:Dont Forget!Dont forget about the meeting today!Cc:$,Copyright IBM Corporation 2008,Receiving Mail,YOU HAVE NEW MAIL$mailMail 5.2 UCB AIX5.X Type?for help/var/spool/mail/team01:2 messages 1 new U 1 team05 Tue Jan 7 10:50 10/267 Hello!N 2 team02 Wed Jan 8 11:25 16/311 Meeting?t 2From team02 Wed Jan 8 11:25 2003Date:Wed 8 Jan 2003 11:25From:team02To:team01Subject:MeetingCc:There will be a brief announcement meeting today in room 602 at noon.?d(Delete message)?q(Quit mail command),Copyright IBM Corporation 2008,The write and wall Commands,Send messages to other users on a systemwrite provides conversation-like communication with another logged-in user.Each user alternatively sends and receives messages.The wall command writes to all terminals.This is useful to notify all users of a system event:,$write team01(or)$write sarahmoon,$wall The system will be inactive from 10pm today.Broadcast message from team01sys1(pts/1)at 15:11:58The system will be inactive from 10pm today.$,Copyright IBM Corporation 2008,$talk fred(user john requests the connection),(to accept the invitation fred enters:),talk with Another User,Copyright IBM Corporation 2008,mesg,The mesg command controls whether other users on the system can send messages to you:,team01$mesgThe current status is y.team01$mesg nteam01$,team02$write team01write:0803-031 Permission denied.team02$,Copyright IBM Corporation 2008,Corrects mistakesTerminates the currentcommand and returns to theshellEnd of transmission or end of fileTemporarily stops output tothe screenResumes output(stopped by Ctrl-s)Erases the entire line,Keyboard Tips,Copyright IBM Corporation 2008,Checkpoint,What is the correct command syntax in AIX?$mail newmail f$mail f newmail$-f mail$mail-f newmailWhat command would you use to send mail items?What are other commands that can be used to communicate with other users?What output would you expect from the following command:cal 8?Which command would you use to find out when a particular user logged in?$who am i$who$finger everyone$finger username,Copyright IBM Corporation 2008,Checkpoint Solutions,What is the correct command syntax in AIX?$mail newmail f$mail f newmail$-f mail$mail-f newmailWhat command would you use to send mail items?mail usernameWhat are other commands that can be used to communicate with other users?talk,write,and wallWhat output would you expect from the following command:cal 8?The calendar for the year 8 ADWhich command would you use to find out when a particular user logged in?$who am i$who$finger everyone$finger username,Copyright IBM Corporation 2008,Exercise:Using The System,Copyright IBM Corporation 2008,Unit Summary,AIX commands can use multiple options and arguments and must follow proper syntax rules.There are many simple,yet powerful commands such as:datecalwho,who am IfingerechoclearbannerCommunicate with other UNIX users using commands such as:mail,write,talk,and wall.,