0

I accidentally deleted /etc/services file from my ec2 instance on AWS running Amazon Linux.

How can I restore this file?
In Ubuntu, I found out that this can be done using netbase package, how can this be achieved in Amazon Linux(centOS flavor) ?

3
  • find rpm name - rpm -qf /etc/services in my case its setup-2.8.71-7.amzn2.noarch then please go through - centos.pkgs.org/7/centos-x86_64/… Sep 7, 2018 at 5:48
  • @sanjayparmar That link is not for Amazon Linux. Sep 7, 2018 at 12:10
  • @Mandeep Singh , package name is same on both. it was tested on my AWS instance Sep 8, 2018 at 7:01

1 Answer 1

0

You can just copy the file from another instance, or because it is part of the setup package, you can run:

yum reinstall setup

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .