How To Set Ip On Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. Log into your Linux system as the superuser.
2. Type ifconfig at the prompt.
3. Type the following command to set your IP address:
sudo ifconfig eth0 <IP address> netmask <subnet mask> up
4. Type the following command to set your default gateway:
sudo route add default gw <gateway IP address>
5. Type the following command to set your DNS server:
sudo echo “nameserver <DNS server IP address>” >> /etc/resolv.conf
6. Type the following command to save the settings:
sudo /etc/init.d/networking restart
7. Type exit to log out of the superuser account.