I'm still learning Linux, and have been for the past 7 years, but am still rusty on scripting.
Can someone tell me if it is possible to create a script that will change the DNS IP address of your interface from dynamic (from DHCP) to a specific static IP address? If so, can someone point me to how this can be done?
I know you can change these settings from command line using VI on the /etc/resolve.conf file but I wasn't sure if there was a way to automatically change that with a script that I can simply launch from the GUI desktop in Ubuntu 8.10.
Thanks in advance.
EdTheUniqueGeek
0
Newbie Poster
Recommended Answers
Jump to PostHey there,
It sounds like you want to change ethernet settings and reset your DNS.
For DNS, the easiest way would be to create an additonal resolv.conf - /etc/resolv.conf.static or something like that - and backup your current resolv.conf and copy that one over it.
For your …
Jump to PostI used Google with the following terms:
resolv.conf and dhcpThere were too many results to link and I do not have a machine to test on. But, plenty of talk on how dhclient overwrites resolv.conf and ways to stop it.
Good luck!
All 6 Replies
eggi
92
Posting Whiz
EdTheUniqueGeek
0
Newbie Poster
Stylish
1
Junior Poster
eggi
92
Posting Whiz
EdTheUniqueGeek
0
Newbie Poster
eggi
92
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.