Ubuntu linux comes with vnstat installed. 
Just type 
vnstat
You will get following output.
                     rx      /      tx      /     total    /   estimated
 enp5s0: Not enough data available yet.
 enp4s0:
       Jun '19     61.09 GiB  /    1.80 GiB  /   62.88 GiB
       Jul '19      4.96 GiB  /  173.10 MiB  /    5.13 GiB  /   96.49 GiB
     yesterday      3.31 GiB  /  134.80 MiB  /    3.44 GiB
         today      1.65 GiB  /   38.30 MiB  /    1.69 GiB  /    2.61 GiB
To know more on how to use this command, type
man vnstat
