Lab 1- Practical Exercise on Getting Started

1.       Logging In

         UserID and password used to login to any UNIX system

         passwd utility for changing your password

2.       Looking Around

         System Information

         date for for seeing the current date and time

         uptime for seeing date / time, number of users and the load on the machine

         who for seeing who is on the system and where they came from

         w for seeing who is on the system and what theyre doing

         User Information

         whoami, who am i used to get information on your current login

         finger{@hostname} {login-name} for getting information on a user, yourself or someone else

         User Communications

         write login-name send one line of a message to other user

         talk login-name{@hostname} {tty} interactive chat with another user

         mesg [ y | n ] turn messages to yourself on or off

         biff [ y | n ] allow notification of incoming e-mail messages

         mail old way to send and read e-mail

         pine new method of reading e-mail


         man [ -k ] command get help (manual pages) on a command

3.       Using the System


         pwd shows the directory youre currently in (present working directory)

         cd path change your directory to the one specified

         cd ~ changes you back to your home directory (default login directory from /etc/passwd file)

         cd acts the same as above


         ls [filename ] shows (lists) files in the current directory

         ls l shows files in the current directory including permissions, owner, group, time, etc.

         ls -A show all files in the directory, including hidden (dot) files

         ls -F show all files in the directory using special characters to identify file types

         touch filename creates a file with nothing in it (0 bytes)

         cp source-file destination-file copy a file to a new file (absolute or relative paths O.K.)

         mv source-file destination-file rename (move) a file to another file (includes directories)

         rm filename deletes (removes) a file (permanently!!!!)

         cat filename displays the contents of a file

         more filename displays the contents of a file one screen at a time

         less filename displays the contents of a file, allowing you to scroll up or down in the file

         head { -#-of-lines } display the first lines of a file, default is 10

         tail { -#-of-lines } display the last lines of a file, default is 10

         grep search-string filename search a file for text (the search-string)

         sort filename sort each line of a file in alpha-numeric order

         uniq filename show only unique lines in a file

         diff file1 file2 compare file1 with file2, showing the differences between them

         compress filename compact a file to save space (changes a text file to a binary file)

         uncompress filename un-compact a file back to its original form and size

         zcat filename show the contents of a compressed file

         wc { -l } filename calculate the number of lines (word count) in a file

         ln { -s } file1 file2 links original file1 to the new file2


         vi { filename } edit a file (visual); this is the UNIX-guru way!

         pico { filename } edit a file; this is the novice way!

4.       Logging Out

         logout logs you out of the UNIX system, ending your session: always do this!!!