Communicate over a Network

Many commands that you can use to communicate with other users on a single computer system have been extended to work over a network. Examples of extended utilities are electronic mail programs, information-gathering utilities (such as finger, page 61), and communications utilities. These utilities are examples of the UNIX philosophy: Instead of creating a new, special-purpose tool, modify an existing one.

Many utilities understand a convention for the format of network addresses: user@host (spoken as user at host). When you use an @ sign in an argument to one of these utilities, the utility interprets the text that follows as the name of a remote host. When it does not include an @ sign, a utility assumes that you are requesting information from or corresponding with someone on the LAN.

The prompts shown in the examples in this chapter include the hostname of the system you are using. When you frequently use more than one system over a network, you may find it difficult to keep track of which system you are using at any particular moment. The default prompt for bash under OS X includes the hostname of the local system so that it is always clear which system you are using. To identify the computer you are using, run hostname or uname n:

$ hostname kudos.local 

See page 286 for information on how you can change the prompt.

finger: Displays Information About Remote Users

The finger utility displays information about one or more users on a system. This utility was designed for local use, but when networks became popular, it was obvious that finger should be enhanced to reach out and collect information remotely. In the following examples, finger displays information about all users logged in on the system named bravo:

[kudos]$ finger @bravo [bravo] Login    Name                 TTY  Idle  Login  Time   Office  Phone zach     Zach                *con  2:10  Sat    12:28 zach     Zach                 p1         Sat    13:17 

A user's login name in front of the @ sign causes finger to display information from the remote system for the specified user only:

[kudos]$ finger zach@bravo [] Login: zach                             Name: Zach Directory: /Users/zach                  Shell: /bin/bash On since Sat May 21 12:28 (CDT) on console, idle 2:12 (messages off) On since Sat May 21 13:17 (CDT) on ttyp1 from No Mail. No Plan. 

The finger utility works by querying a standard network service, the fingerd daemon, that runs on the system being queried. Although this service is supplied with Mac OS X, most sites choose not to run it to minimize the load on their systems, reduce security risks, or maintain privacy. It is disabled by default. When you use finger to obtain information about someone at such a site, you will see an error message or nothing at all. It is the remote fingerd daemon that determines how much information to share and in what format. As a result, the report displayed for any given system may differ from the preceding examples.

Security: The fingerd daemon

The finger daemon (fingerd) gives away system account information that can aid a malicious user. Some sites disable finger or randomize user account IDs to make a malicious user's job more difficult. This daemon is controlled through xinetd under Mac OS X version 10.3 and earlier and launchd under version 10.4 and later. It is disabled by default.

The information for remote finger looks much the same as it does when finger runs on the local system, with one difference: Before displaying the results, finger reports the name of the remote system that answered the query (bravo, as shown in brackets in the preceding example). The name of the host that answers may be different from the system name you specified on the command line, depending on how the finger daemon service is configured on the remote system. In some cases, several hostnames may be listed if one finger daemon contacts another to retrieve the information.

Sending Mail to a Remote User

Given a user's login name on a remote system and the name of the remote system or its domain, you can use an email program to send a message over the network or the Internet, using the @ form of an address:



Although the @ form of a network address is recognized by many Mac OS X utilities, you may find that you can reach more remote computers with email than with the other networking utilities described in this chapter. This disparity arises because the mail system can deliver a message to a host that does not run IP, even though it appears to have an Internet address. The message may be routed over the network, for example, until it reaches a remote system that has a point-to-point, dial-up connection to the destination system. Other utilities, such as talk, rely on IP and operate only between networked hosts.

Mailing List Servers

A mailing list server (listserv[14]) allows you to create and manage an email list. An electronic mailing list provides a means for people interested in a particular topic to participate in an electronic discussion and for a person to disseminate information periodically to a potentially large mailing list. One of the most powerful features of most list servers is their ability to archive email postings to the list, create an archive index, and allow users to retrieve postings from the archive based on keywords or discussion threads. Typically you can subscribe and unsubscribe from the list with or without human intervention. The owner of the list can restrict who can subscribe, unsubscribe, and post messages to the list. Popular list servers include LISTSERV (, Lyris (, Majordomo (, Mailman (, and ListProc ( Apple maintains quite a few mailing lists and list archives for those lists ( Use Google to search on OS X mailing list to find other lists.

[14] Although the term listserv is sometimes used generically to include many different list server programs, it is actually a specific product and a registered trademark of L-soft International, Inc.: LISTSERV (for information go to

A Practical Guide to UNIX[r] for Mac OS[r] X Users
A Practical Guide to UNIX for Mac OS X Users
ISBN: 0131863339
EAN: 2147483647
Year: 2005
Pages: 234

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: