0% found this document useful (0 votes)
33 views

Communication in Linux

The document provides information about basic networking commands in Linux, including: - The mesg command controls whether other users can send messages and has options to allow (mesg y) or prevent (mesg n) messages. - The who -T command displays users logged in and their willingness to receive messages, indicated by +, -, or ?. - The talk command allows interactive messaging between users by copying lines between terminals once a connection is established and accepted. - The write, wall, finger, ping, traceroute, and ssh commands provide additional ways of communication and information about the network and users. The document also summarizes email facilities in Linux including the pine email client and basic email

Uploaded by

Fausiya Salim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Communication in Linux

The document provides information about basic networking commands in Linux, including: - The mesg command controls whether other users can send messages and has options to allow (mesg y) or prevent (mesg n) messages. - The who -T command displays users logged in and their willingness to receive messages, indicated by +, -, or ?. - The talk command allows interactive messaging between users by copying lines between terminals once a connection is established and accepted. - The write, wall, finger, ping, traceroute, and ssh commands provide additional ways of communication and information about the network and users. The document also summarizes email facilities in Linux including the pine email client and basic email

Uploaded by

Fausiya Salim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

BASIC NETWORKING COMMANDS

Module 5
Communication in Linux
The mesg Command
• To control whether other users can send messages
to you
• Can set a terminal mode so that other users can
start a chat session with you
• Two options available
– mesg y: other users can send messages
– mesg n: other users cannot send messages
• No parameters: displays current message
permission settings
• The root user can send messages to any computer
regardless of settings
The who –T Command
• who command used to determine users who are
currently logged in
• Gives a four-column output
• Gives names of users, name of terminal from where
they logged in, login date and time
• Provides list of online users
• Does not provide info on status of a users
willingness to receive messages
The who –T Command
• To display status use who –T command
• Gives a five-column output
• Second column provides users willingness to receive
messages
– + indicates user has allowed access
– - indicates user has not allowed access
– ? Indicates unable to determine status
The talk Command
• An interactive messaging system
• To talk or chat with another user on the network
• Copies lines from your terminal to that of another
user
• Syntax:
– talk person [ttyname]
• Example:
– talk angela
The talk Command
• Terminal name to be specified if other user has
logged in from different terminals
• To start the chat, a message is sent to the other
person
• To establish connection, other user must accept the
message that is sent
• If message is not accepted, talk will send the same
message every 30 seconds until it is accepted
• The user can cancel it by pressing <Ctrl>+C keys
The talk Command
• When the connection is established, following
message will be displayed
– [Ringing your party again]
• To accept message angela need to type
– talk angela@angelasmachine
• When connection is established terminal window
divided into two screens
– Upper half: text that we type
– Lower half: text typed by the correspondent
• Connection closed by pressing <Ctrl>+C
The write utility
• To send a message on another users terminal
• Syntax:
– write user_name [terminal_name]
• Example:
– write angela
• These messages displayed only if mesg y is set at the
other user end
The write Utility
• If mesg n is set, write dispalys the following
message:
– write: Angela has messages disabled
• If other user is not logged on write displays
following message:
– write: Angela is not logged in
• If user logged in from different terminals, message
sent to terminal with highest accumulated time
• To enable two-way communication, mesg y to be set
at both ends
The wall Utility
• To send messages to all users connected
• To all currently logged in users with mesg y
• Syntax:
– wall <message>
• When no parameter given, accepts input from
keyboard
• Can type multiple lines
• Terminated by <Ctrl>+C
The finger Utility
• To display status of all currently logged in users
• Syntax:
– finger [options] [username]
• Displays user’s login name, full name, terminal name,
write status, idle time, login time, logged in machine
address and office phone number
• Without any parameters, displays single line output
for all users
• Write permission displayed with the terminal name
as an asterisk
– If asterisk comes after terminal name, write permission is
denied
The finger Utility
• Also used to display specific info about individual
users
• Specify login name of user with finger utility
• Example: finger steve
• Additional info displayed:
– Users home directory
– Home phone number
– Login shell
– Mail status
– Contents of the files .plan, .project and .forward
Options with finger Utility
Option Meaning

-s Same as finger with no options

-l Same as finger <user name>, but only if user is logged in

-p Don’t transfer info from .plan and .project files

-m Makes finger case-sensitive


The chfn Utility

• To change info displayed by finger command


• Checks for user info from /etc/passwd file and
allows user to change it
• Syntax:
– chfn [options] [username]
• If no options, user can type or modify info for each
field in /etc/passwd file
• First asks for user’s password for authentication
• If a field is not to be modified, just press enter
Options with chfn Utility
Option Meaning

-f <full name> To modify your complete name

-o <office> To modify office address or room number

-p <office phone> To modify office phone number-h

-h To modify home phone number

-u To display help

-v To display version number of chfn


The ping Command

• To verify whether or not a particular IP address


exists and can accept requests
• Ping command sends a packet to a specified address
and awaits response
• Syntax:
– ping <ip address> OR
– ping <domain name>
The traceroute Command
• To determine the path a packet takes to reach
destination
• Packet can be 1KB or 1000 characters
• Packet contains source and destination address,
length, number and sequence of packet
• Routers switch packets from one network to
another
• Traceroute command gives the sequence of hops
the packet has traversed
• Also calculates and displays time taken by each hop
The traceroute Command
• Syntax:
– traceroute <ip address> OR
– traceroute <domain name>
The ssh Command
• Acronym for Secure Shell
• To start a secure connection to a remote Linux
system
• Uses encrypted connection technology
– Public key encryption
• Passwords are also encrypted
• Once server authenticates username and password,
user gets a normal shell on remote system
• Syntax:
• ssh [-l login name] [host name] [user@@hostname]
[command]
EMAIL FACILITIES IN
LINUX
METHODS FOR
COMMUNICATION
• Use write or talk utility
• Use email
TWO COMPONENTS
OF EMAIL SYSTEM

 Mail User Agent (MUA)


 User Interface of the mail software
 Example: pine, elm, mail, netscape etc
 Mail Transfer Agent (MTA)
 Manages transfer of mail
 Example: sendmail, fetchmail
HOW EMAIL WORKS?

 User can access the mailbox by starting any MUA


 Mail identification corresponds to login name
 MUA passes message onto MTA
 MTA resolves destination of recipient from emailid
 If remote recipient, MTA establishes connection
with mail machines on route to destination and
transfers mail
 TCP used for connection and SMTP used for
routing messages
 MTA also any manages problems in mail delivery
MAIL ADDRESS FORMAT
FOR RECIPIENTS

 Format
 <user login name>@<hostname>
 Example: pine, elm, mail, netscape etc
 Example:
[email protected]
STORING
RECIPIENT DETAILS

 Store the needed email addresses


 Make use of a personal address book
THE PINE UTILITY
 PINE: Program for Internet News and Email
 A character based MUA in Linux
 Used to exchange messages and Internet news
 Menu-driven
 Easy to use
 Syntax:
 pine [options] [address, address]
FEATURES OF PINE

 Can view, save, export, delete, print, reply to and


forward messages
 Can postpone delivery of messages
 Uses simple editor PICO, that has word-wrap and spell-
check facilities
 Enables full-screen selection and management of
message folders
 Uses address book to maintain list of frequently used
addresses
FEATURES OF PINE CONTD

 Enables new mail checking and notification after a


specified number of minutes and after certain
commands such as <Ctrl>+L
 Can use online, context-sensitive help screens
 Can send files as attachments in email
 Can customize as per requirements
FILES USED BY PINE

 /var/spool/mail/username
 ~/mail
 ~/.addressbook
 ~/.addressbook.lu
 ~/.pine-debug[1-4]
 ~/.newsrc
 ~/.signature
 ~/.mailcap
 /etc/pine.conf
 ~/.pinerc
THE PINE OPENING
SCREEN
MAIN MENU OF
PINE
COMMANDS AT
THE OPENING
MENU
Command Meaning Usage
? Help Gives detailed help
C Compose Message Compose/draft a message
I Message Index Displays messages in current folder
L Folder List Selects a folder to view
A Address Book Stores email addresses of people
S Setup Used to configure pine options
R Release Notes Displays release notes of pine
K Keyboard Lock Locks keyboard using password
COMMANDS
AVAILABLE IN
SETUP SCREEN
Command Meaning Usage
P Printer Configures printer
N New password To modify current password
C Configure Helps to configure mail services
S Signature Helps to set your signature here
A Address Books Stores emailids
L Collection List To create/delete folders
R Roles To create and modify roles
? Help Detailed help
OPTIONS
AVAILABLE WITH
PINE COMMAND
Option Meaning
<address list> Displays compose screen addressed to to the
given email address
-attach <file> Displays compose screen with specified file
attached
-attachlist <filelist> Sends multiple files as attachments
-attach_and_delete Displays compose screen, attaches file and
<file> deletes it when finished
-f <folder> Specifies folder name to be opened with pine
-l <keystrokes> Specifies first set of keystrokes after opening
pine
-F <file> Opens specified file to view

You might also like