How To Change Network Settings In Linux Command Line?
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. To view or set your IP address, type the following command at the terminal: $ifconfig
2. To configure your IP address, type the following command at the terminal: $sudo ifconfig <device> <IP address>
3. To view or set your default gateway, type the following command at the terminal: $route –n
4. To configure your default gateway, type the following command at the terminal: $sudo route add default gw <gateway_IP_address>
5. To view or set your DNS server, type the following command at the terminal: $cat /etc/resolv.conf
6. To configure your DNS server, type the following command at the terminal: $sudo echo “nameserver <DNS_server_IP_address>” >>/etc/resolv.conf