You are on page 1of 45

CAREER POINT UNIVERSITY

HAMIRPUR
PRACTICAL FILE
Of

LINUX ADMINISTRATION

CSL 303

Submitted to: - Submitted by:-


Mr. Ankush Akahay
Roll No. H11559
B.Tech (5th)
By department of C.S.E
INDEX

S.N. Name of program Date Remarks


01 Write a program to install Ubuntu 21/08/18

02 24/08/18
Study the basic Linux commands
03 File System and working with 07/09/18
files in Linux Operating System.

04 Write a program to print a hello. 08/09/18

05 Write script to display current 14/09/18


date, time, username and current
directory.

06 Write a shell script to read and 15/09/18


check the directory exists or not, if
not make directory.

07 Write a shell script to print 12/10/18


following pattern.

08 Starting the vi Editor 20/10/18

09 Basic commands of networking. 26/10/18

10 Write a program to install mail 15/11/18


client in linux
PROGRAM: 1

Aim : Write a program to install Ubuntu.

1. Install Ubuntu 16.04 LTS

Using a DVD?

It’s easy to install Ubuntu from a DVD. Here’s what you need to do:

Put the Ubuntu DVD into the DVD-drive

Restart your computer. You should see a welcome screen prompting you to choose your
language and giving you the option to install Ubuntu or try it from the DVD.

If you don’t get this menu, read the booting from the DVD guide for more information.

Using a USB drive?


Most newer computers can boot from USB. You should see a welcome screen prompting you to
choose your language and giving you the option to install Ubuntu or try it from the USB.
If your computer doesn’t automatically do so, you might need to press the F12 key to bring up
the boot menu, but be careful not to hold it down - that can cause an error message.

2.Prepare to install Ubuntu

 We recommend you plug your computer into a power source


 You should also make sure you have enough space on your computer to install Ubuntu
 We advise you to select Download updates while installing and Install this third-party
software now
 You should also stay connected to the internet so you can get the latest updates while you
install Ubuntu
 If you are not connected to the internet, you will be asked to select a wireless network, if
available. We advise you to connect during the installation so we can ensure your
machine is up to date
3.Allocate drive space

Use the checkboxes to choose whether you’d like to Install Ubuntu alongside another operating
system, delete your existing operating system and replace it with Ubuntu, or — if you’re an
advanced user — choose the ’Something else’ option.

4.Begin the installation

Depending on your previous selections, you can now verify that you have chosen the way in
which you would like to install Ubuntu. The installation process will begin when you click the
Install Now button.
Ubuntu needs about 4.5 GB to install, so add a few extra GB to allow for your files.

5.Select your location

If you are connected to the internet, this should be done automatically. Check your location is
correct and click ’Forward’ to proceed. If you’re unsure of your time zone, type the name of the
town you’re in or click on the map and we’ll help you find it.
6.Select your preferred keyboard layout

Click on the language option you need. If you’re not sure, click the ’Detect Keyboard Layout’
button for help.

7. Enter your login and password details

Your name:

Your computer’s name:


Pick a username:

Choose a password:

Confirm your password:


8.Learn more about Ubuntu while the system installs…

9.That’s it.

All that’s left is to restart your computer and start enjoying Ubuntu!
PROGRAM: 2

Aim: To study the basic Linux commands

To Handle file

Basic Linux Commands

mkdir - make directories

Usage

mkdir [OPTION] DIRECTORY

Options

Create the DIRECTORY(ies), if they do not already exist.

 Mandatory arguments to long options are mandatory for short options too.

 -m mode=MODE set permission mode (as in chmod), not rwxrwxrwx - umask

 -p parents no error if existing, make parent directories as needed

 -v verbose print a message for each created directory

 -help display this help and exit

 -version output version information and exit

cd - change directories

Use cd to change directories. Type cd followed by the name of a directory to access that
directory. Keep in mind that you are always in a directory and can navigate to directories
hierarchically above or below.
mv- change the name of a directory

Type mv followed by the current name of a directory and the new name of the directory.

 Ex: mv testdir newnamedir

pwd - print working directory

will show you the full path to the directory you are currently in. This is very handy to use,
especially when performing some of the other commands on this page

 Rmdir - Remove an existing directory

 rm -r

Removes directories and files within the directories recursively.


chown - change file owner and group

Usage

chown [OPTION] OWNER [: [GROUP]] FILE

Chown [OPTION] :GROUP FILE

chown [OPTION] --reference=RFILE FILE

Options

Change the owner and/or group of each FILE to OWNER and/or GROUP. With --reference,
change the owner and group of each FILE to those of RFILE.

 -c changes like verbose but report only when a change is made

 -dereference affect the referent of each symbolic link, rather than the symbolic link itself

 -h no-dereference affect each symbolic link instead of any referenced file (useful only on
systems that can         change the ownership of a symlink)

 -from=CURRENT_OWNER:CURRENT_GROUP

  change the owner and/or group of each file only if its current owner and/or group match those
specified here.  Either  may  be omitted,  in which case a match is not required for the omitted
attribute.

-no-preserve-root do not treat `/' specially (the default)

-preserve-root fail to operate recursively on `/'

-f, -silent, -quiet  suppress most error messages

-reference=RFILE use RFILE's owner and group rather than the specifying OWNER: GROUP
values

-R -recursive operate on files and directories recursively

-v -verbose output a diagnostic for every file processed


The following options modify how a hierarchy is traversed when the -R option is also
specified. If more than one is specified, only the final one takes effect.

-H     if a command line argument is a symbolic link to a directory, traverse it

-L     traverse every symbolic link to a directory encountered

-P     do not traverse any symbolic links (default)

chmod - change file access permissions

Usage

chmod [-r] permissions filenames

 r - Change the permission on files that are in the subdirectories of the directory that you are
currently in.        permission Specifies the rights that are being granted. Below are the different
rights that you can grant in an alphanumeric format. Filenames File or directory that you are
associating the rights with Permissions

u - User who owns the file.

g - Group that owns the file.

o - Other.

a - All.

r - Read the file.

w - Write or edit the file.

x - Execute or run the file as a program.

ls - Short listing of directory contents

-a        list hidden files


-d        list the name of the current directory

-F        show directories with a trailing '/'

            executable files with a trailing '*'

-g        show group ownership of file in long listing

-i        print the inode number of each file

-l        long listing giving details about files and directories

-R        list all subdirectories encountered

-t        sort by time modified instead of name

cp - Copy files

cp myfileyourfile

Copy the files "myfile" to the file "yourfile" in the current working directory. This command will
create the file "yourfile" if it doesn't exist. It will normally overwrite it without warning if it
exists.

Cp -i myfile your file

With the "-i" option, if the file "yourfile" exists, you will be prompted before it is overwritten.

cp -i /data/my file

Copy the file "/data/myfile" to the current working directory and name it "myfile". Prompt before
overwriting the file.

cp -dprsrcdirdestdir

Copy all files from the directory "srcdir" to the directory "destdir" preserving links (-poption),
file attributes (-p option), and copy recursively (-r option). With these options, a directory and all
it contents can be copied to another dir
ln - Creates a symbolic link to a file.

ln -s test symlink

Creates a symbolic link named symlink that points to the file test Typing "ls -i test symlink" will

show the two files are different with different inodes. Typing "ls -l test symlink" will show that
symlink points to the file test.

locate - A fast database driven file locator.

slocate -u

This command builds the slocate database. It will take several minutes to complete this
command. This command must be used before searching for files, however cron runs this
command periodically on most systems. Locate whereis Lists all files whose names contain the
string "whereis". directory.

more - Allows file contents or piped output to be sent to the screen one page at a time

less - Opposite of the more command

cat - Sends file contents to standard output. This is a way to list the contents of short files to the
screen. It works well with piping.

whereis - Report all known instances of a command

wc - Print byte, word, and line counts

bg - bg jobs Places the current job (or, by using the alternative form, the specified jobs) in the
background, suspending its execution so that a new user prompt appears immediately. Use
the jobs command to discover the identities of background jobs.

cal month year - Prints a calendar for the specified month of the specified year.

cat files - Prints the contents of the specified files.

clear - Clears the terminal screen.


cmp file1 file2 - Compares two files, reporting all discrepancies. Similar to the diff command,
though the output format differs.

diff file1 file2 - Compares two files, reporting all discrepancies. Similar to the cmp command,
though the output format differs.

dmesg - Prints the messages resulting from the most recent system boot.

fg jobs - Brings the current job (or the specified jobs) to the foreground.

file files - Determines and prints a description of the type of each specified file.

find path -name pattern -print

Searches the specified path for files with names matching the specified pattern (usually enclosed
in single quotes) and prints their names. The find command has many other arguments and
functions.

finger users - Prints descriptions of the specified users.

free  - Displays the amount of used and free system memory.

ftp hostname

Opens an FTP connection to the specified host, allowing files to be transferred. The FTP
program provides subcommands for accomplishing file transfers.

head files - Prints the first several lines of each specified file.

2)Process Handling

kill process_ids

kill - signal process_ids

kill -l

Kills the specified processes, sends the specified processes the specified signal (given as a
number or name), or prints a list of available signals.
killall program

killall - signal program

Kills all processes that are instances of the specified program or sends the specified signal to all
processes that are instances of the specified program.

mail - Launches a simple mail client that permits sending and receiving email messages.

ping host - Sends an echo request via TCP/IP to the specified host. A response confirms that the
host is operational.

reboot - Reboots the system (requires root privileges).

shutdown minutes

shutdown -r minutes

Shuts down the system after the specified number of minutes’ elapses (requires root privileges).
The -r option causes the system to be rebooted once it has shut down.

sleep time - Causes the command interpreter to pause for the specified number of seconds.

sort files - Sorts the specified files. The command has many useful arguments; see the online
documentation.

split file - Splits a file into several smaller files. The command has many arguments; see the
online documentation

sync - Completes all pending input/output operations (requires root privileges).

telnet host - Opens a login session on the specified host.

top - Prints a display of system processes that's continually updated until the user presses
the q key.

traceroute host - Uses echo requests to determine and print a network path to the host.

uptime - Prints the system uptime.


w - Prints the current system users
PROGRAM: 3

Aim: File System and working with files in Linux Operating System.

Linux File System Layout

For convenience, the Linux file system is usually thought of in a tree structure.

Description of directories:

/bin Common programs, shared by the system, the system administrator and the users.

/bootThestartup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub
is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders
we know today.

/devContains references to all the CPU peripheral hardware, which are represented asFiles with
special properties.

/etcMost important system configuration files are in /etc, this directory contains data similar to
those in the Control Panel in Windows

/homeHome directories of the common users.

/initrd(on some distributions) Information for booting. Do not remove!

/libLibrary files, includes files for all kinds of programs needed by the system and the users.

/lost+foundEvery partition has a lost+found in its upper directory. Files that were saved during
failures are here.

/miscFor miscellaneous purposes.

/mntStandard mount point for external file systems, e.g. a CD-ROM or a digital camera.

/net Standard mount point for entire remote file systems

/optTypically contains extra and third party software.


/procA virtual file system containing information about system resources. More information
about the meaning of the files in procis obtained by entering the command man proc in a
terminal window. The file proc.txt discusses the virtual file system in detail.

/rootThe administrative user's home directory. Mind the difference between /, the root
directoryand /root, the home directory of the root user.

/sbin Programs for use by the system and the system administrator.

/tmpTemporary space for use by the system, cleaned upon reboot, so don't use this for saving
any work!

/usr Programs, libraries, documentation etc. for all user-related programs.

/varStorage for all variable files and temporary files created by users, such as log files, the mail
queue, the print spooler area, space for temporary storage of files downloaded from the Internet,
or to keep an image of a CD before burning it.

Working with files in Linux Operating System.

 mkdir: Used For create directories in Linux operating system. With -p option you
cancreate subdirectories.
 rmdir: Helps to remove directories with different options like -r for remove
directoriesforcefully if root directory contains other sub directories.

 rm: Used for remove file. With -i option it will prompt for yes or no while removing file
 cp:Used for copy files.

 du: Display how much space a file has been occupied. With -c option you can see total
space occupied by a file.
 cat: Used to display the contents of file. You can use cat command for create a file and
useCTRL+d for save that file.
 mv: Used for move files from one location to another location.
 df: It displays the file fragmentations in your system.
 gzip: Used for compress files.

 zcat: Used for read the compressed file contents.


 gunzip: Used for decompress the file which is compress with gzip command. It is also
used for read file contents like zcat command with -c option.
PROGRAM: 4

Aim: Write a program to print a hello.

#/bin/bash

#my first script

Echo “hello world”

OUTPUT:-
PROGRAM: 5

Aim: Write script to display current date, time, username and current
directory.

mkdir student

cd student

touch record

cat record

echo

echo current date: $(date)

echo user:$(whoami)

echo current directory:$(pwd)

sh record
OUTPUT:-
PROGRAM: 6

Aim: Write a shell script to read and check the directory exists or not, if not
make directory.

#!\bin\bash

FILE=””

DIR=”/tmp”

#intt

If [“$(ls –A Srecord)”];then

echo “take action $DIR is not empty”

else

echo”$DIR is empty”

fi

OUTPUT:-
PROGRAM: 7

Aim: Write a shell script to print following pattern.

#!/bin/ksh

Str=”*”

For I in 1 2 3 4 5

Do

Echo “$str”

Str =”$str *”

done

OUTPUT:-
PROGRAM :8

Starting the vi Editor

There are following way you can start using vi editor −

Command Description

vi filename Creates a new file if it already does not exist, otherwise opens existing file.

vi -R filenameOpens an existing file in read only mode.

You will notice a tilde (~) on each line following the cursor. A tilde represents an unused line. If
a line does not begin with a tilde and appears to be blank, there is a space, tab, newline, or some
other nonviewable character present.
Operation Modes

While working with vi editor you would come across following two modes −

 Command mode − This mode enables you to perform administrative tasks such as
savingfiles, executing commands, moving the cursor, cutting (yanking) and pasting lines
or words,and finding and replacing. In this mode, whatever you type is interpreted as a
command.
 Insert mode − This mode enables you to insert text into the file. Everything that's typed
inthis mode is interpreted as input and finally it is put in the file.

The vi always starts in command mode. To enter text, you must be in insert mode. To come in
insert mode you simply type i. To get out of insert mode, press the Esc key, which will put you
back into command mode.

Getting Out of vi

The command to quit out of vi is :q. Once in command mode, type colon, and 'q', followed by
return. If your file has been modified in any way, the editor will warn you of this, and not let you
quit. To ignore this message, the command to quit out of vi without saving is :q!. This lets you
exit vi without saving any of the changes.

 The command to save the contents of the editor is :w. You can combine the above
command with the quit command, or :wq and return.
 The easiest way to save your changes and exit out of vi is the ZZ command. When you
are incommand mode, type ZZ and it will do the equivalent of :wq.
Moving within a File

To move around within a file without affecting your text, you must be in command mode (press
Esc twice). Here are some of the commands you can use to move around one character at a time

CommandDescription

k Moves the cursor up one line.

jMoves the cursor down one line.

hMoves the cursor to the left one character position.

l Moves the cursor to the right one character position.

There are following two important points to be noted −

The vi is case-sensitive, so you need to pay special attention to capitalization when


usingcommands. Most commands in vi can be prefaced by the number of times you want the
action to occur.

Editing Files
To edit the file, you need to be in the insert mode. There are many ways to enter insert mode
from the command mode −

CommandDescription

I Inserts text before current cursor location.

I Inserts text at beginning of current line.

A Inserts text after current cursor location.

AInserts text at end of current line.

o Creates a new line for text entry below cursor location.

O Creates a new line for text entry above cursor location.

Control Commands

There are following useful command which you can use along with Control Key –

Command Description

CTRL+dMove forward 1/2 screen

CTRL+dMove forward 1/2 screen

CTRL+fMove forward one full screen

CTRL+uMove backward 1/2 screen

CTRL+bMove backward one full screen

CTRL+eMoves screen up one line

CTRL+yMoves screen down one line

CTRL+uMoves screen up 1/2 page

CTRL+dMoves screen down 1/2 page


CTRL+bMoves screen up one page

CTRL+fMoves screen down one page

CTRL+I Redraws screen


PROGRAM :9

Aim: Study the basic commands of networking.

Linux is most powerful operating system, and networking is an essential part of servers. it offers
many inbuilt commands to diagnose for network issues. In this article, I will show you useful
Linux networking commands, which will help you in troubleshooting.

Connectivity:

ping<host> —- sends an ICMP echo message (one packet) to a host. This may go
continually until you hit Control-C. Ping means a packet was sent from your machine
via ICMP, and echoed at the IP level. ping tells you if the other Host is Up.

telnet host <port> —- talk to “hosts” at the given port number. By default, the telnet
port is port 23. Few other famous ports are:
7 - echo port,
25 – SMTP, use to send mail
79 – Finger, provides information on other users of the network

Use control-] to get out of telnet.

Arp:

Arp is used to translate IP addresses into Ethernet addresses. Root can add and delete
arp entries. Deleting them can be useful if an arp entry is malformed or just wrong.
Arp entries explicitly added by root are permanent — they can also be by proxy. The
arp table is stored in the kernel and manipulated dynamically. Arp entries are cached
and will time out and are deleted normally in 20 minutes.

arp –a : Prints the arp table


arp –s <ip_address><mac_address> [pub] to add an entry in the table
arp –a –d to delete all the entries in the ARP table
Routing:

netstat –r —- Print routing tables. The routing tables are stored in the kernel and used
by ip to route packets to non-local networks.
route add —- The route command is used for setting a static (non-dynamic by hand
route) route path in the route tables. All the traffic from this PC to that IP/SubNet will
go through the given Gateway IP. It can also be used for setting a default route; i.e.,
send all packets to a particular gateway, by using 0.0.0.0 in the pace of IP/SubNet.

routed —– The BSD daemon that does dynamic routing. Started at boot. This runs the
RIP routing protocol. ROOT ONLY. You won’t be able to run this without root
access.

gated —– Gated is an alternative routing daemon to RIP. It uses the OSPF, EGP, and
RIP protocols in one place. ROOT ONLY.

traceroute —- Useful for tracing the route of IP packets. The packet causes messages
to be sent back from all gateways in between the source and destination by increasing
the number of hopes by 1 each time.
netstat –rnfinet : it displays the routing tables of IPv4
sysctlnet.inet.ip.forwarding=1 : to enable packets forwarding (to turn a host into a
router)
routeadd|delete [-net|-host] <destination><gateway>  (ex. route add 192.168.20.0/24
192.168.30.4) to add a route
route flush : it removes all the routes
route add -net 0.0.0.0 192.168.10.2 : to add a default route
routed -Pripv2 –Pno_rdisc –d [-s|-q] to execute routed daemon with RIPv2 protocol,
without ICMP auto-discovery, in foreground, in supply or in quiet mode

route add 224.0.0.0/4 127.0.0.1 : it defines the route used from RIPv2
rtquery –n : to query the RIP daemon on a specific host (manually update the routing
table)
Others:

nslookup —- Makes queries to the DNS server to translate IP to a name, or vice versa.
eg. nslookup facebook.com will gives you the IP of facebook.com
ftp<host>water —– Transfer files to host. Often can use login=“anonymous” ,
p/w=“guest”
rlogin -l —– Logs into the host with a virtual terminal like telnet

Important Files:

/etc/hosts —- names to ip addresses


/etc/networks —- network names to ip addresses
/etc/protocols —– protocol names to protocol numbers
/etc/services —- tcp/udp service names to port numbers

Tools and network performance analysis

ifconfig<interface><address> [up] : start the interface


ifconfig<interface> [down|delete] : stop the interface
ethereal & : it allows you open ethereal background not foreground
tcpdump –i -vvv : tool to capture and analyze packets
netstat –w [seconds] –I [interface] : display network settings and statistics
udpmt –p [port] –s [bytes] target_host : it creates UDP traffic
udptarget –p [port] : it’s able to receive UDP traffic
tcpmt –p [port] –s [bytes] target_host : it creates TCP traffic
tcptarget –p [port] it’s able to receive TCP traffic

Switching:

ifconfig sl0 srcIPdstIP : configure a serial interface (do “slattach –l /dev/ttyd0”


before, and “sysctlnet.inet.ip.forwarding=1“ after)
telnet 192.168.0.254 : to access the switch from a host in its subnetwork
shru or show running-configuration : to see the current configurations
configure terminal : to enter in configuration mode
exit : in order to go to the lower configuration mode

VLAN:

vlan n : it creates a VLAN with ID n


no vlan N : it deletes the VLAN with ID N
untagged Y : it adds the port Y to the VLAN N
ifconfig vlan0 create : it creates vlan0 interface
ifconfig vlan0 vlan ID vlandev em0 : it associates vlan0 interface on top of em0, and
set the tags to ID
ifconfig vlan0  [up] : to turn on the virtual interface
tagged Y : it adds to the port Y the support of tagged frames for the current VLAN

socklabudp – it executes socklab with udp protocol


sock – it creates a udp socket, it’s equivalent to type sock udp and bind
sendto<Socket ID><hostname><port #> – emission of data packets
recvfrom<Socket ID><byte #> – it receives data from socket
socklabtcp – it executes socklab with tcp protocol
passive – it creates a socket in passive mode, it’s equivalent to socklab, sock tcp,
bind, listen
accept – it accepts an incoming connection (it can be done before or after creating the
incoming connection)
connect <hostname><port #> – these two commands are equivalent to socklab, sock
tcp, bind, connect
close – it closes the connection
read <byte #> – to read bytes on the socket
write (ex. write ciao, ex. write #10) to write “ciao” or to write 10 bytes on the socket

NAT/Firewall

rm /etc/resolv.conf – it prevent address resolution and make sure your filtering and
firewall rules works properly.
ipnat –f file_name – it writes filtering rules into file_name
ipnat –l – it gives the list of active rules
ipnat –C –F – it re-initialize the rules table
map em0 192.168.1.0/24 -> 195.221.227.57/32 em0 : mapping IP addresses to the
interface
map em0 192.168.1.0/24 -> 195.221.227.57/32 portmaptcp/udp 20000:50000  :
mapping with port.
ipf –f file_name : it writes filtering rules into file_name.
ipf –F –a : it resets the rule table.
ipfstat –I : it grants access to a few information on filtered packets, as well as active
filtering rules.
PROGRAM: 10

Aim: Write a program to install mail client.

Mail client: If you want to send or receive an email, you should have a mail server capable of
sending and receiving mail across the Internet. In this post, we will discuss the Linux mail server
and how SMTP protocol (the standard protocol for mail transport across the internet) works, as
well as other mail-related protocols like Post Office Protocol (POP) and Internet Message Access
Protocol (IMAP) and the relationship between them.

Linux SMTP Server

SMTP (Simple Mail Transfer Protocol) defines how mail is sent from one host to another. It does
not define how the mail should be stored or how it is displayed. It is also system-independent,
which means that the sender and receiver could have different operating systems.

SMTP requires only that a server is able to send straight ASCII text to another server, and this is
done by connecting to the server on port 25which is the standard SMTP port.

Most Linux distros today are shipped with two of the most common implementation of
SMTP: sendmail and postfix.

Sendmail is a popular open-source mail server implementation used by many Linux distros, but
it has a little complex design and less secured. The Postfix took mail server implementation one
step further — it was developed with security in mind.

Mail Service Components

The mail service on any mail server has three components:

1. Mail user agent (MUA). This is a component that the user sees and interacts with (like
Thunderbird and Microsoft Outlook). These user agents are responsible for reading mail
and allowing you to compose mail.

2. Mail transport agent (MTA). This component is responsible for getting the mail from
one site to another (like Send mail and Postfix).
3. Mail delivery agent (MDA). This component is responsible for distributing received
messages on the local machine to the appropriate user mailbox (like postfix-
maildrop and Procmail).

Command to install Mail Client:

Sudo apt-get install mailvtils


PROGRAM: 10

Aim: Write a program to install mail client.

Mail client: If you want to send or receive an email, you should have a mail server capable of
sending and receiving mail across the Internet. In this post, we will discuss the Linux mail server
and how SMTP protocol (the standard protocol for mail transport across the internet) works, as
well as other mail-related protocols like Post Office Protocol (POP) and Internet Message Access
Protocol (IMAP) and the relationship between them.

Linux SMTP Server

SMTP (Simple Mail Transfer Protocol) defines how mail is sent from one host to another. It does
not define how the mail should be stored or how it is displayed. It is also system-independent,
which means that the sender and receiver could have different operating systems.

SMTP requires only that a server is able to send straight ASCII text to another server, and this is
done by connecting to the server on port 25which is the standard SMTP port.

Most Linux distros today are shipped with two of the most common implementation of
SMTP: sendmail and postfix.

Sendmail is a popular open-source mail server implementation used by many Linux distros, but
it has a little complex design and less secured. The Postfix took mail server implementation one
step further — it was developed with security in mind.

Mail Service Components

The mail service on any mail server has three components:

1. Mail user agent (MUA). This is a component that the user sees and interacts with (like
Thunderbird and Microsoft Outlook). These user agents are responsible for reading mail
and allowing you to compose mail.

2. Mail transport agent (MTA). This component is responsible for getting the mail from
one site to another (like Send mail and Postfix).
3. Mail delivery agent (MDA). This component is responsible for distributing received
messages on the local machine to the appropriate user mailbox (like postfix-
maildrop and Procmail).

Command to install Mail Client:

Sudo apt-get install mailvtils

You might also like