nos lab manual

26
Experiment1: Linux installation Ubuntu can be installed with the graphical CD. Make sure that your computer is set to boot from a CD before a hard drive. 1. Insert the Ubuntu disc into your CD drive. 2. Start or restart your computer. The Language screen appears 3. Select your desired language and click Install Ubuntu 10.04 LTS. The Where are you? Window appears.

Upload: ramesh-chandra-joshi

Post on 26-Aug-2014

92 views

Category:

Documents


10 download

DESCRIPTION

Lab Manual of Network Operating System (NOS)

TRANSCRIPT

Page 1: NOS Lab Manual

Experiment1: Linux installation

Ubuntu can be installed with the graphical CD. Make sure that your computer is set to boot from a CD before a hard drive.

1. Insert the Ubuntu disc into your CD drive. 2. Start or restart your computer. The Language screen appears

3. Select your desired language and click Install Ubuntu 10.04 LTS. The Where are you? Window appears.

Page 2: NOS Lab Manual

4. Select the location closest to your location and click forward. The Keyboard layout window appears.

Page 3: NOS Lab Manual

5. If the Suggested option is not correct, select the correct keyboard layout. Click Forward. The Prepare disk space window appears.

6. If you want to install Ubuntu over your entire hard drive, then Select Erase and use the entire disk and select the hard drive that you want to install Ubuntu.

Page 4: NOS Lab Manual

WARNING: Installing Ubuntu on your entire hard disk will erase all data that is currently on the drive.

OR

6. If you want to install Ubuntu on a single partition Dual Booting, Select Guided – resize. In the New partition size area, drag the area between the two partitions to create your desired partition sizes. Click Forward.

Page 5: NOS Lab Manual

7. The Who are you? window appears.

8. Enter the requested information, and click Forward. The Ready to install window appears.

Page 6: NOS Lab Manual

9. Verify that the language, layout, location, and personal information are correct and click Install. The installation wizard begins.

10. When the installation wizard finishes, the Installation complete window appears.

Click Restart now to restart your computer. Ubuntu is now installed.

Page 7: NOS Lab Manual

Experiment2: Linux shell and Basic shell commands Objective: To introduce the student to Linux most popular command line shell, the BASH. This lab will cover basic commands used in Unix/Linux. Scope: On the completion of this lab, you will be able to:

Describe the bash and its features. Understand the bash environment. Use some frequently-used command in UNIX/ Linux environment.

Useful Concepts: Shell

A piece of software that provides an interface for users. Typically, an operating system shell which provides access to the services of a

kernel. Generally fall into one of two categories:

i. Command-line ii. Graphical

Bash (Bourne-again shell) is the default shell on most systems built on top of the Linux kernel as well as on Mac OS X and it can be run on most Unix-like operating systems.

Terminal An instant of a shell that provide an editor for the user to enter commands and run processes Shell Prompt

Location in the terminal where you can enter commands. Represented by $ or >

Root directory / is the primary directory where all other directories reside. Mount point The location in the operating system's directory structure where a mounted file system appears Package Computer software packaged in an archive format to be installed by a package management system or a self-sufficient installer Boot loader

Page 8: NOS Lab Manual

The small program that starts loading OS into RAM, also known as a bootstrap loader, or bootstrap or boot loader Exercise:- This exercise illustrates how to view content of a directory and move around the file system To get a listing of the directory contents, type: ls For a long view of the listing with time stamps, file permissions and file ownerships type: ls -l To move to directory-name directory type: cd directory-name To go to the /etc directory you simply type cd /etc To go one step back type: cd .. To go to user's home directory, type: cd ~ To display the path to the directory you r currently working in, type: pwd At any point using the TAB key after typing a few characters in at the bash prompt will make bash fill in the rest of the file or directory name that matches what you have typed. If there is more than one match, tap the tab key twice and it will list all the matches.

Page 9: NOS Lab Manual

Experiment3: Command Line File Manipulation Objective: To familiarize the students with basic file and directory management using shell. Scope: Student will be able to perform the following tasks at the end of this lab:

The Working Directory Listing Directory Contents Viewing Files Copying Files Moving and Renaming Files Searching for Files by File Name & by Content Creating & Creating Subdirectories Creating Symbolic Links

Useful Concepts: Working Directory

A special directory remembered by the shell, and is interpreted to be the directory you are currently “in”.

Important for situation where relative paths are in use. Symbolic link

A symbolic (or soft) link is an indirect reference to a file, similar to an “alias” in Mac OS or a “shortcut” in Windows. Meta characters

Characters having special meaning to the terminal Wildcards are Meta characters that can represent different characters in a string.

Following are some Special Characters with a brief description: Character Function Examples \ Escape character. If you want to reference a special character,

you must “escape” it with a backslash first. touch /tmp/filename\*

/ Directory separator, used to separate a string of directory names. /usr/src/linux . Current directory. Can also “hide” files when it is the first

character in a filename. .htaccess

.. Parent directory cd.. ~ User's home directory cd~

Page 10: NOS Lab Manual

* Represents 0 or more characters in a filename, or by itself, all files in a directory.

-

? Represents a single character in a filename. hello?.txt can represent hello1.txt, helloz.txt, but not hello22.txt

[ ] Can be used to represent a range of values, e.g. [0-9], [AZ], Etc.

hello[0-2].txt represents the names hello0.txt, hello1.txt, and hello2.txt

; Command separator. Allows you to execute multiple Commands on a single line.

cd /var/log ; less messages

Exercise:- This exercise illustrates how to View contents of a file. To view file contents on shell console, type: cat filename To merge contents of two or more files and display it on screen, type cat file1 file2 file3 ... To display display a screenful text of file on the terminal, type: more filename To display file contents screenful at a time with page-up and page-down options, type: less filename To view first k lines of the file, type: head -n k filename e.g, to display first 5 lines of the file myfile on the terminal, type; head -n 5 myfile To display last 5 lines of the file myfile on the terminal, type; tail -n 5 myfile

Page 11: NOS Lab Manual

Experiment4: Command Line File processing Objective: To familiarize students with the directory level and file level security, compressing and archiving techniques. Scope:

On the completion of this lab, students will be able to: Understand file types used in LINUX system. View and modify file access permission. Change the ownership of files and directories Create backup for critical files using archives

Useful Concepts: Access Permissions

The ability of a user to access a file or directory. Three general types of permissions are read permission, write permission and execute

permission. File owner

The user of the system to whom the file belongs. Archive

A collection of contents (files or directories) for backup purpose. Compression

A technique used for reducing the size of a file or a directory without effecting contents. Exercise:- This exercise shows which types of files are used in linux and how to know about file types Linux considers each device as file. There are many types of file that are used in Linux. Use ls –l command to find the type of file. For example: javidali@JLaptop:/dev$ ls -l crw-rw----+ 1 root audio 14, 4 2009-04-28 07:01 audio drwxr-xr-x 3 root root 60 2009-04-28 12:01 bus crw------- 1 root dialout 5, 1 2009-04-28 07:01 console lrwxrwxrwx 1 root root 11 2009-04-28 07:01 core -> /proc/kcore srw-rw-rw- 1 root root 0 2009-04-28 07:01 log

Page 12: NOS Lab Manual

brw-rw---- 1 root disk 8, 1 2009-04-28 12:01 sda1 javidali@JLaptop:/dev$ In this example, first character in each row, I.e. the first colom represent the file type. The following table shows file types, representation symbols with short description. Symbol File type Description - Regular files text file, Postscript, graphics files, Hypertext (HTML),

video file etc

d Directories Files that act as containers to other files

b Block files Files that are used for block (parallel) devices. Data from such devices are read or written to in blocks.

c Character files Files that are used for character (serial) devices. Data from such devices are read or written to character by character

l Symbolic links Shortcut to other files or directories

s socket files Files that are used in communication

Regular files other than text files can be explored by using an appropriate program, as indicated in the table below. Follow the command with the name of the file to view it or omit the file name and select the file from the menu once the program is running. File Type Application Name Command for the application Postscript gv (based on GhostView) gv Portable Document Format (PDF) Adobe Acrobat Reader acroread Image files XV xv Image files The Gimp gimp LaTeX ouput (DVI) xdvi xdvi Hypertext (HTML) Netscape Netscape MP3 and MPEG gtv gtv

Page 13: NOS Lab Manual

Experiment5: Command line Text Editors (Vim) Objective: To enable students to use command line editors for editing text files. Completing this lab, students will give sufficient knowledge about vim / vi and its features for their daily tasks. Scope: On the completion of this lab, you will be able to:

Start the editor, moving cursor around and exiting the editor. Work in command mode. Copy, Cut and past the text format program and check source code Search Character/string. Recover Your Work.

Useful Concepts: vi

A screen-based editor used by many UNIX users. Has a powerful feature to aid programmers.

Editing modes There are two editing modes that the editor can be executed in.

Insert mode User can type text in this mode

Command mode User can use commands for operation on the file. (E.g. saving, exiting, searching, etc.)

Text Buffers in VI

There are 36 special buffers and also a general purpose buffer for temporary storage of words or. When a block of text is cut from the file it is placed into the general purpose buffer but, if specified, the block of text can also be stored in another buffer. Buffers are numbered from a-to-z and from 0-to-9.

Page 14: NOS Lab Manual

Exercise:- This exercise illustrates how to start the editor, move cursor around and exit from the editor To start the editor from command line, type

vi An empty file will be opened in the editor. If you want to open an existing file in the editor, type

vi filename To switch to 'Insert' mode, press:

i key -- INSERT -- key word at the bottom will indicate that you are in an inserting mode and your cursor will start blinking, to go to the start of the line. Press

a at command mode will take you to the current cursor position and you can enter any text. To move cursor around while you are in command mode, press

h key move left, l key move right, k key move up, j key = move down

you can also use arrow keys while in insert mode to do the same tasks. To switch back to command mode, press

Escape key While in command mode, each command is preceded by colon ":" To exit the editor without saving changes made to the file, switch to command mode and type,

:q! To save changes and exit the editor, switch to command mode and type the command,

:wq Where "w" is for writing changes to the file and "q" is to quit or exit the editor

Page 15: NOS Lab Manual

Experiment6: Managing the file system Objective: To update the students with knowledge about command line file system and partition management. Scope: On the completion of this lab, you will be able to recognize:

Pathnames Relative/Absolute Paths, Path and Environmental Settings, Directories vs. Partitions in the File System, Recognizing / modifying Partitions. Understand the bash environment.

Useful Concepts: Directory A special type of file that contains other files or directories, same as folders in Windows File system Like other platforms (Windows, Mac OS etc.,), Linux file system is also hierarchical one. Directories can be created inside other directories in a tree-like structure. Root Directory The Linux file system tree has only one root, called the root directory, represented by / Sub Directory A directory inside another directory is usually called a subdirectory. Pathname Pathname is a sequence of directories to be followed to reach the file. For example, the pathname of the file myfile.txt in the cs user's home directory is /home/cs/myfile.txt. Absolute pathnames A pathname that contains all the information needed to find a file or that start form root directory / is called absolute pathname. Relative pathname A pathname that contains information necessary to find a file from a particular point in the tree is called relative pathname. For example, from the directory /home, the relative pathname of myfile.txt is just cs/myfile.txt. Note that this pathname has no leading /.

Page 16: NOS Lab Manual

Exercise:- This exercise illustrates how Multiple Disks in the File system are represented. Each partition of the disk is mounted at a separate directory in the file system. So, for example, a separate disk may be mounted at the directory /mnt. In this case, every time you access something in directory /mnt, you are actually accessing a file on this separate disk. This is transparent to the user, but you can peek at which disks are mounted where on a computer by using the df command in the shell. You will see something like this: Filesystem 1k-blocks Used Available Use% Mounted on /dev/hda8 497667 78511 393454 17% / /dev/hda1 14607 2758 1 1095 20% /boot /dev/hda7 5308207 1085340 3948063 22% /usr /dev/hdc 609750 609750 0 100% /mnt/cdrom The first line indicates that the disk with symbolic name5 /dev/hda8 is mounted at the root directory. The second line indicates that another disk with symbolic name /dev/hda1 is mounted at subdirectory /boot. The third line is similar. The disk in the fourth line represents the CD-ROM drive, which is mounted at /mnt/cdrom.

Page 17: NOS Lab Manual

Experiment7: Command line Process Management Objective: Objective of this lab is to introduce the students with command-line process control and management. Scope: The student will be able to know the following at the end of this lab:

Listing Processes Ending a Process Running a Process in the Background Changing the process favorability (priority)

Useful Concepts: Processes Linux, like most modern operating system, is multitasking, which means that it can execute many programs simultaneously. A program that is currently executing is called a process. A Linux system consists of several dozen active processes at any time. Some of these processes are system processes that perform important “behind the scenes” tasks and some are user processes corresponding to programs like Netscape or Emacs. Nice A process favorability to access the system recourses (processor time) Signals A special instruction to the process under consideration Exercise:- This exercise illustrates Listing Processes You can view the processes that are currently running on the system with the ps command. Type ps now and you will see something like the following:

javidali@JLaptop:~$ ps PID TTY TIME CMD 23985 pts/0 00:00:01 bash 24001 pts/0 00:00:00 ps javidali@JLaptop:~$

This tells you that you are running 2 processes and the commands (CMD) used to start them were bash (your shell) and ps (the process you just started when you entered ps). The first column in the list, headed by PID, gives the process ID for each process, an integer used to uniquely identify each process. The next column, TTY, gives the terminal name to which the

Page 18: NOS Lab Manual

process is attached. The third column, TIME, gives the amount of time the process has been running for (or the amount of time it has been running since it was last sleeping or stopped). Using ps by itself only gives information about processes that you own, which, unless you are a system administrator, is usually all the information you need. If you want information about all the processes running on the system, you can issue the ps aux command. This command combines 3 options (the normal dash before options is not necessary) which, together, give information about all processes that have users have attached to them. Here is a (significantly trimmed) example of what this output might look like:

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 1324 76 ? S Jul23 0:12 init [5] root 2 0.0 0.0 0 0 ? SW Jul23 0:21 [kflushd] root 3 0.0 0.0 0 0 ? SW Jul23 0:03 [kupdate] root 4 0.0 0.0 0 0 ? SW Jul23 0:00 [kpiod] root 5 0.0 0.0 0 0 ? SW Jul23 0:14 [kswapd] root 6 0.0 0.0 0 0 ? SW< Jul23 0:00 [mdrecoveryd] root 415 0.0 0.1 1548 160 ? S Jul23 0:02 syslogd -m 0 rpc 440 0.0 0.1 1472 252 ? S Jul23 0:00 portmap root 456 0.0 0.0 0 0 ? SW Jul23 0:00 [lockd] root 500 0.0 0.2 5744 272 ? S Jul23 0:00 [ypbind] nobody 566 0.0 0.0 7616 24 ? S Jul23 0:00 [identd] . . . root 1006 14.7 24.7 62796 31612 ? R Jul23 53:50 /etc/X11/X javid 7892 0.0 1.2 7580 1564 ? S 14:15 0:00 gnome-session javid 7957 0.0 1.3 4700 1700 ? S 14:15 1:39 sawmill javid 7966 0.0 2.1 9336 2784 ? S 14:15 3:51 panel javid 7969 0.0 0.8 8404 1092 ? S 14:15 0:00 gmc javid 7972 0.0 0.7 3560 968 ? S 14:15 0:11 xscreensaver javid 7992 0.0 1.3 7676 1676 ? S 14:26 0:21 gnome-terminal javid 7994 0.0 0.6 2440 796 pts/0 S 14:26 0:01 bash javid 12504 0.0 0.1 2004 156 pts/0 S 15:08 0:00 netscape javid 24059 0.0 0.7 2728 900 pts/0 R 15:42 0:00 ps aux

This listing gives a lot of information about the 100 or so processes that are probably currently executing on the system. For example, you can gather that the computer was rebooted last on July 23. You can see that X windows (/etc/X11/X) is using almost 25% of the computer’s memory at the moment and 15% of the CPU time. You can also view the current status (STAT) of each of the processes in the system. An R in this column means that the processing is currently “runnable” which, as you will learn when you take Operating Systems, means that the process is either currently running or in the ready queue, waiting to gain access to the processor. An S indicates that the process is “sleeping” (currently not waiting to use the processor). A W means that, in addition to sleeping, the process has been “swapped out” (not currently resident in memory but on the disk instead). Lastly, the < marks a process that is given higher priority than normal while waiting for the CPU.

Page 19: NOS Lab Manual

Experiment8: Basic Bash Scripting, writing and executing bash scripts Objective: To familiarize students with the basics of bash scripting. How to write and execute bash scripts under the Linux environment. Scope: The students would be able to do the following at the end of this lab:

Write Hello world script. Usage of Variables, Global vs. Local variables Passing arguments to the bash script Executing shell commands with bash Reading User Input/ output

Useful Concepts: Bash

A UNIX shell as well as an interpreter Script

A set of instruction (commands) that can be executed on a sell (interprecter). Exercise:- Hello world example. The script declares a string variable, stores “Hello World” in it and finally prints the value of variable on the screen

#!/bin/bash # declare STRING variable STRING="Hello World" #print variable on a screen echo $STRING

Saving and executing the scripts Save the above script in the file named “hello_world.sh” Navigate to the directory where the script is saved Execute the script using the command “./hello_world.sh”

Page 20: NOS Lab Manual

Experiment9: Linux Networking 1 Objective: To familiarize students with the configuration, activation/de-activation and virtual interfacing Scope:

The students would be able to do the following at the end of this lab: Find all the interfaces available on the system List the active interfaces. Configure TCP/IP options for an interface. Configure an interface for automatic configuration via DHCP or bootp server. Create virtual interfaces and use single NIC for multiple networks at a time.

Exercise:- This exercise illustrate how to Determining Your IP Address Most modern PCs come with an Ethernet port. When Linux is installed, this device is called eth0. You can determine the IP address of this device with the ifconfig command.

[root@tmp]# ifconfig -a eth0 Link encap:Ethernet HWaddr 00:08:C7:10:74:A8 inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:47379 errors:0 dropped:0 overruns:0 frame:0 TX packets:107900 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:4676853 (4.4 Mb) TX bytes:43209032 (41.2 Mb) Interrupt:11 Memory:c887a000-c887b000 [root@tmp]#

In this example, eth0 has an IP address of 192.168.1.100 and a subnet mask of 255.255.255.0. This command gives good information on the interrupts, or PCI bus ID, used by card.

Page 21: NOS Lab Manual

Experiment 10: Linux Networking 2 Objective: To familiarize students that how a Linux server could be used as router Scope: The students would be able to do the following at the end of this lab:

Configure the default gateway for the Linux router. Add/Delete static routes to the Linux router.

Useful Concepts: Router

The node in the internetwork which connects two homogeneous networks. Internetwork

A network that is built up of networks. Exercise:- This exercise demonstrate How to View Your Current Routing Table The netstat -nr command will provide the contents of the touting table. Networks with a gateway of 0.0.0.0 are usually directly connected to the interface. No gateway is needed to reach your own directly connected interface, so a gateway address of 0.0.0.0 seems appropriate. The route with a destination address of 0.0.0.0 is your default gateway. In the following example there are two gateways, the default and the one to 255.255.255.255 which is usually added on DHCP servers. It is a DHCP server in this case.

[root@tmp]# netstat -nr Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 255.255.255.255 0.0.0.0 255.255.255.255 UH 40 0 0 wlan0 192.168.1.0 0.0.0.0 255.255.255.0 U 40 0 0 wlan0 127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo 0.0.0.0 192.168.1.1 0.0.0.0 UG 40 0 0 wlan0 [root@tmp]#

In this example, there are multiple gateways handling traffic destined for different networks on different interfaces.

[root@tmp]# netstat -nr Kernel IP routing table

Page 22: NOS Lab Manual

Destination Gateway Genmask Flags MSS Window irtt Iface 172.16.68.64 172.16.69.193 255.255.255.224 UG 40 0 0 eth1 172.16.11.96 172.16.69.193 255.255.255.224 UG 40 0 0 eth1 172.16.68.32 172.16.69.193 255.255.255.224 UG 40 0 0 eth1 172.16.67.0 172.16.67.135 255.255.255.224 UG 40 0 0 eth0 172.16.69.192 0.0.0.0 255.255.255.192 U 40 0 0 eth1 172.16.67.128 0.0.0.0 255.255.255.128 U 40 0 0 eth0 172.160.0 172.16.67.135 255.255.0.0 UG 40 0 0 eth0 172.16.0.0 172.16.67.131 255.240.0.0 UG 40 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo [root@tmp]#

Page 23: NOS Lab Manual

Experiment11: Network troubleshooting Objective: To give the students an introduction to the main causes of network related problems. Scope: At the end of this lab students will be able to fix a network related problem which is either in the forms of slow response times from the remote server, or a complete lack of connectivity. Useful Concepts: Sources of Network Slowness

NIC duplex and speed incompatibilities Network congestion Poor routing Bad cabling Electrical interference An overloaded server at the remote end of the connection Mis-configured DNS

Sources of a Lack of Connectivity

Severe sources of Power failures Shut down The remote server or an application on the remote server.

Exercise:- This exercise illustrate Basic Cable and Link Tests Your server won't be able to communicate with any other device on your network unless the NIC's "link" light is on. This indicates that the connection between your server and the switch/router is functioning correctly. In most cases a lack of link is due to the wrong cable type being used. There are two types of Ethernet cables crossover and straight-through. Always make sure you are using the correct type. Other sources of link failure include: The cables are bad. The switch or router to which the server is connected is powered down. The cables aren't plugged in properly. If you have an extensive network, investment in a battery-operated cable tester for basic connectivity testing is invaluable. More sophisticated models in the market will be able to tell you the approximate location of a cable break and whether an Ethernet cable is too long to be used.

Page 24: NOS Lab Manual

Experiment12: Installing Linux Packages Objective: To familiarize students that how a Linux server could be used as router Scope: The students would be able to do the following at the end of this lab:

list installed and available packages Install a package locally Install a package from the internet.

Useful Concepts: Automated Package Download The disadvantage of manual downloads is that the packages often won't install unless certain prerequisite packages have been installed beforehand. This can lead to the download and installation of several packages which can become tedious. All the major Linux distributions have automated download and update utilities. For example, Fedora uses yum and Ubuntu and Debian use apt. Exercise:- This exercise illustrates how to get RPMs Using Command-Line Anonymous FTP Anonymous FTP allows you to log in and download files from a FTP server using the username anonymous or the shorter username ftp and a password that matches your email address. This way anyone can access the data. Let's illustrate this with an example of using anonymous FTP to download the SSH package from download.fedora.redhat.com:

1) First we issue the FTP command targeting download.fedora.redhat.com at the command line.

[root@bigboy tmp]# ftp download.fedora.redhat.com Trying 66.187.232.35... Connected to download.fedora.redhat.com (66.187.232.35). 220 Fedora FTP server ready. All transfers are logged. Name (download.fedora.redhat.com:root): anonymous 331 Please specify the password. Password: 230 Login successful. Have fun. Using binary mode to transfer files. ftp> pwd 257 "/" ftp> ls 227 Entering Passive Mode (66,187,232,35,57,155) 150 Here comes the directory listing.

Page 25: NOS Lab Manual

drwxr-xr-x 3 ftp ftp 4096 Oct 29 15:59 pub 226 Directory send OK. ftp>:

2) After we've logged in, we can use the help command to see what options we have at our disposal.

ftp> help Commands may be abbreviated. Commands are: ! cr mdir proxy send ------ ftp>

3) By using the Web browsing feature on the Web site ahead of time, I know that the Fedora Core 2 RPMs are located in the pub/fedora/linux/core/2/i386/os/Fedora/RPMS/ directory and will use the cd command to change my directory to there. We can use the ls command to get a listing of files in this directory.

ftp> cd pub/fedora/linux/core/2/i386/os/Fedora/RPMS/ 250 Directory successfully changed. ftp> ls open* 227 Entering Passive Mode (66,187,232,35,58,3) 150 Here comes the directory listing. ... ... -rw-r--r-- ... ... 184281 Oct 28 23:29 openssh-3.6.1p2-34.i386.rpm ... ... 226 Directory send OK. ftp>

4) Next we get the file we need and place it in the local directory /usr/rpm. The hash command will print "#" hash signs on the screen during the download.

ftp> hash Hash mark printing on (1024 bytes/hash mark). ftp> lcd /usr/rpm Local directory now /usr/rpm ftp> get openssh-3.6.1p2-34.i386.rpm local: openssh-3.6.1p2-34.i386.rpm remote: openssh-3.6.1p2-34.i386.rpm 227 Entering Passive Mode (66,187,232,35,58,25) 150 Opening BINARY mode data connection for openssh-3.6.1p2-34.i386.rpm (184281 bytes). ################################################226 File send OK. 184281 bytes received in 3.41 secs (53 Kbytes/sec) ftp>

Page 26: NOS Lab Manual

Note: You can also use wildcards to download the RPMs you need using the mget command. You'll be prompted for each of the matching RPM files. In the next example, we just aborted this download by typing n.

ftp> mget openssh-3.6* mget openssh-3.6.1p2-34.i386.rpm? n ftp>

5) Finally we use the exit command to leave FTP. ftp> exit 221 Goodbye.

root@bigboy tmp]#