Skip to content

Check your unread messages in Gmail, from terminal

Using the following command, you can check your unread messages in gmail, from terminal:

$ curl -u username –silent “https://mail.google.com/mail/feed/atom” | perl -ne ‘print “\t” if //; print “$2\n” if /(.*)/;’

replace username with your gmail username.

This command will promt for your password, enter it and view your unread in your gmail account .


Dipin Krishna

Written by Dipin Krishna

Senior full-stack engineer — 15 years across Django, Laravel, SwiftUI and the infrastructure underneath. Available for contract work.

Work with me →

Leave a note

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.