Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 0 A “Quick-Start” into the UNIX Operating System.

Similar presentations


Presentation on theme: "Chapter 0 A “Quick-Start” into the UNIX Operating System."— Presentation transcript:

1 Chapter 0 A “Quick-Start” into the UNIX Operating System

2 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Objectives To introduce the UNIX Text User Interface and show the generic structure of UNIX commands To describe how to connect and log on to a computer running UNIX operating system To explain how to manage and maintain files and directories To show where to get online help for UNIX commands To demonstrate the use of a beginner’s set of utility commands To cover the basic commands and operators alias, biff, cal, cat, cd, cp, exit, hostname, login, lp, lpr, ls, ma, mesg, mkdir, more, mv, passwd, pg, pwd, rm, rmdir, talk, telnet, unalias, uname, whatis, whereis, who, whoami, write

3 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Structure of a UNIX command $ command [ [ - ] option (s) ] [ option argument (s) ] [ command argument (s) ] Examples: $ ls $ ls -la $ ls -la m* $ lpr -Pspr -n 3 proposal.ps

4 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Logging On and Logging Off General Categories –Local Area Network (LAN) Connection. –Internet Connection. –Stand-Alone Connection.

5 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 1. Connecting via a UNIX Terminal login: your_username password: your_password NOTICE: 1. This machine is rebooted at 4:15 am daily. 2. Please keep accounts below 100 MB. (du) 3. Limit TOTAL modem connect times to ONE hour from the hours of 5:00 PM to midnight. You have new mail. DISPLAY = (upsun17.egr.up.edu:0.0) TERM = (FreeBSD) Upibm7.egr.up.edu:~ 1$

6 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 2. Connecting via PuTTY on a Microsoft Windows Machine

7 Copyright © 2005 Pearson Addison-Wesley. All rights reserved.

8 3. Connecting via a Telnet Client on a Microsoft Windows Machine.

9 Copyright © 2005 Pearson Addison-Wesley. All rights reserved.

10 File Maintenance Commands and Help on UNIX Command Usage What is File Maintenance? File and Directory Structure –Home Directory –Current Working Directory

11 Copyright © 2005 Pearson Addison-Wesley. All rights reserved.

12 File Maintenance Commands and Help on UNIX Command Usage (Contd) Viewing the Contents of Files –cat, more $ cat > myfile This is an example of how to use the cat command to add plain text to a file $ more myfile This is an example of how to use the cat command to add plain text to a file $

13 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. File Maintenance Commands and Help on UNIX Command Usage (Contd) Creating, Deleting and Managing Files –cp, mv, rm, ls $ cp myfile myfile2 $ mv myfile2 renamed_file $ mv “latest revisions october.txt” laterevs.txt $ rm renamed_file $ ls Desktop Mail XF86Config.new kdeinit.core order.asp.html order.asp_files myfile myfile2 $ ls –al... $

14 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. File Maintenance Commands and Help on UNIX Command Usage (Contd) Creating, Deleting and Managing Directories –mkdir, cd, pwd, rmdir $ mkdir first $ cd first $ pwd /usr1.b/bobk/first $ cd $ pwd /usr1.b/bobk $ cp myfile myfile2 $ ls my* myfile myfile2 $ rmdir first rmdir: first: Directory not empty $

15 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. File Maintenance Commands and Help on UNIX Command Usage Obtaining Help with the man Command

16 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. File Maintenance Commands and Help on UNIX Command Usage (Contd) Obtaining Help with the man Command –man [options][-s section] command-list $ man ls LS(1) FreeBSD General Commands Manual LS(1) NAME ls - list directory contents SYNOPSIS ls [-ABCFGHLPRTWZabcdfghiklmnopqrstuwx1] [file...] DESCRIPTION For each operand that names a file of a type other than directory, ls displays its name as well as any requested, associated information. For each operand that names a file of type directory, ls displays the names of files contained within that directory, as well as any requested, associated information. If no operands are given, the contents of the current directory are displayed. If more than one operand is given, nondirectory operands are displayed first; directory and nondirectory operands are sorted separately and in lexicographical order. The following options are available: Press to continue, or q to quit q $ man -s2 read

17 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Other Methods of Obtaining Help –whatis $ whatis login set setenv login(1) -sign on set(1) -set runtime parameters for session setenv (1) -change or add an environment variable $ File Maintenance Commands and Help on UNIX Command Usage (Contd)

18 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Utility Commands Examining System Setups –whereis, whoami $ whoami bobk $ whereis mkdir mkdir: /usr/bin/mkdir $ Printing and General Utility Commands –lpr, cal $ lpr -Pspr order.eps $ Communication Commands –write username

19 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Utility Commands (Contd)

20 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. Command Aliases The alias command can be used to create pseudonyms (nicknames) for commands Syntax for the alias command is: –alias [name [ = string ] …] Bourne, Korn, Bash shells –alias [name [ string ] ] C shell

21 Copyright © 2005 Pearson Addison-Wesley. All rights reserved. The alias Command Examples

22 Copyright © 2005 Pearson Addison-Wesley. All rights reserved.

23


Download ppt "Chapter 0 A “Quick-Start” into the UNIX Operating System."

Similar presentations


Ads by Google