Posted by Amrita Gautam at July 18, 2021
The strongest feature of UNIX is self-networking or communication. Today most of the companies still prefer UNIX because of this feature. Communication is a facility through which user can send and receive messages and data from one user to another. There are two type of communication is possible in UNIX: Remote communication as well as local communication.
This chapter will introduce you to the concept of communication in UNIX, type of communication, online communication, offline communication, commands related with communication and at last concept of UUCP
8.1 COMMUNICATION IN UNIX
In any kind of Multi-user Operating System, it is often necessary for users to know about each other, when there is of hundreds of user working in the network who are fat apart then electronic communication is the only way to share data and messages. There can be two king of communication in UNIX:
8.1.1 Remote Communication
Remote communication is facility provided by UNIX through which any user who is working in some other platform and network can connect with UNIX server by simply using server address. There are some utilities like telnet and rlogin, which lets you, login to the System remotely. Telnet is used most often. There are telnet clients available for nearly any platform, though usually UNIX System are the only ones running a telnet server. Telneting into a UNIX machine will allow you to use a command line shell, including full screen display programs if your terminal is set up properly. Rlogin (short for Remote-LOGIN) looks similar to telnet on the surface, but uses a different set of protocols. More information is exchanged between the client and server during an rlogin session than during a telnet session. This gives it more functionality, but also creates some security risky if not used carefully. One of the main features of rlogin is the. hosts file. This is a file that a user can have in his or her home directory that lists a set of machines and usernames that are to be considered “trusted”. This allow the user to login to one of the trusted machines, and then rlogin into the main machine without supplying a password. I’m sure it’s obvious at this point why hosts files should be used with care. Besides rlogin, there is a whole suite of remote applications including RCP (remote copy), RCP (remote shell) and rexes (remote execute) that rely on the. hosts file to determine trusted users and machine. Telnet and login are both executed from the command line, with the remote host address as an argument.
This topic cannot be covered in detail because it is not in the scope of this book.
8.1.2 Local Communication
All the users who are working in UNIX environment can share their data communication. Communication can be divided into two categories:
Syntax: write <username>
$ write dit
Type the name of the user to whom you want to send a message, type command and then press < ctrl+d > or oo <over and out> when you want to terminate the message.
At the receiver end message will be displayed as follows:
Through write user can also send message which is stored in a file.
Send test file data to used dit
$ write dit <test
At receiver end
It has two options:
Pass n-if you do want to receiver on-line messages.
Pass y-if you want to receiver messages.
Syntax: message <option>
$ message n
To check whether message permission in on or not
It is same as write command but more convenient in comparison to write and superior also for two reasons:
$ talk dit
Wall is a UNIX command line utility. When invoked, it displays the contents of a file or standard input to all logged-in users. Its name is an abbreviation of “write to all”.
It is generally used by the administrator to send important messages or notification at the time of shutdown.
# wall “this is test message”
The message will be displayed on everyone’s screen who is logged in.
(b). Off-Line Communication: In this kind of communication users can send or receive message when receive is not working. But through this user will not be able to talk or chat. The message will be stored at the receiver’s terminal and receiver can decide that whether he wants to look at the message or not. This communication is like the today’ E-mailing. There are following commands in UNIX that can be used for off-line communication.
1. news command: This command is normally used by any used user read any message that is send by the System administrator. It shows the contents which are stored in a file/user/news.
When user invokes this command he can see the contents of this file.
With mail user can do several things, few of them are as follows:
Sending mail: To send a mail to a particular user, sender needs to type mail command with user name to which he wants to send a message.
Syntax: $mail <user login name>
<ctrl d> key is used to end mail message.
Receiving mail: Now whenever dit user will log into the System he will get a message after login i.e. “You have mail”
Now he can check his mail box by typing command mail at the command prompt. His mail box will be open.
There are same internal commands that can be used to work inside the mail box.
&d or &d2