In centos
Install the required packages with below command
yum install whois
Then enter the below command to check domain expiry date
whois google.com | grep "Registry Expiry Date" | awk '{ print $4 }'
output :
2028-09-14 T0 4:00:00Z
In Ubuntu
Install the required packages with below command
apt-get install whois
Then enter the below command to check domain expiry date
whois google.com | grep "Registry Expiry Date" | awk '{ print $4 }'
output :
2028-09-14 T0 4:00:00Z