Download presentation
Presentation is loading. Please wait.
1
A “Quick-Start” into the UNIX Operating System
Chapter 0 A “Quick-Start” into the UNIX Operating System
2
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 Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
3
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 Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
4
Logging On and Logging Off
General Categories Local Area Network (LAN) Connection. Internet Connection. Stand-Alone Connection. Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
5
1. Connecting via a UNIX Terminal
login: your_username <Enter> password: your_password <Enter> NOTICE: 1. This machine is rebooted at 4: am daily. 2. Please keep accounts below 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) <Enter> TERM = (FreeBSD) <Enter> Upibm7.egr.up.edu:~ 1$ Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
6
2. Connecting via PuTTY on a Microsoft Windows Machine
Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
7
Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
8
3. Connecting via a Telnet Client on a Microsoft Windows Machine.
Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
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 Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
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 <Ctrl-D> $ more myfile $ Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
13
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 ... $ Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
14
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 /usr1.b/bobk $ cp myfile myfile2 $ ls my* myfile myfile2 $ rmdir first rmdir: first: Directory not empty $ Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
15
File Maintenance Commands and Help on UNIX Command Usage
Obtaining Help with the man Command Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
16
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 <SPACE> to continue, or q to quit q $ man -s2 read Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
17
File Maintenance Commands and Help on UNIX Command Usage (Contd)
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 $ Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
18
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 Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
19
Utility Commands (Contd)
Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
20
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 Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
21
The alias Command Examples
Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
22
Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
23
Copyright © 2005 Pearson Addison-Wesley. All rights reserved.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.