Operating System - Linux
1819684 Members
3384 Online
109605 Solutions
New Discussion юеВ

howto read root mail /var/mail/root from command line ?

 
SOLVED
Go to solution
'chris'
Super Advisor

howto read root mail /var/mail/root from command line ?

hi

howto read root mail /var/mail/root from command line under linux ?

greetings
chris
6 REPLIES 6
Ross Minkov
Esteemed Contributor
Solution

Re: howto read root mail /var/mail/root from command line ?

Chris,

One way to do it is -- be root and type mail to read the root mail. See the man page for mail for details. BTW,
root mail is stored in /var/spool/mail/root by default.

Regards,
Ross
Stuart Browne
Honored Contributor

Re: howto read root mail /var/mail/root from command line ?

Yup, you can use any console based mail reader.

'mail' (that ross suggested) is one.
'mutt', 'pico' and 'elm' are other options (if you have them installed).

Or if you want to really old-school it, you can just vi $MAIL (all as root).

If you don't want to do things as root, I suggest you re-alias the user 'root' to another user.
One long-haired git at your service...
Steven E. Protter
Exalted Contributor

Re: howto read root mail /var/mail/root from command line ?

You can install elm ,which is a pretty nice tool

The mail itself is readable with vi or cat on the /var/mail/root file

elm is my tool of choice.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Gopi Sekar
Honored Contributor

Re: howto read root mail /var/mail/root from command line ?


mail is for simple and basic command line usage. if you want full featured text mail client, you can use either pine or mutt.

Never Never Never Giveup
Stuart Browne
Honored Contributor

Re: howto read root mail /var/mail/root from command line ?

hrm.. yea.. pine.. not pico.. typo..

pico is the editor that comes with pine.. from washington uni..
One long-haired git at your service...
Chris Eubank
Valued Contributor

Re: howto read root mail /var/mail/root from command line ?

I use "mutt". :)

C