1

add a line to resolv.conf

view story
linux-howto

http://www.unix.com – Hi, I want to add a search domain name in the beginning of /etc/resolv.conf. If already some '#' symbols are there in the beginning I want to add it below # the search domain which I want to add, the example search domain is "search xxxx.com" So the resolv.conf should be as shown below cat /etc/resolv.conf #domain name entries search xxxx.com 1.2.1.33 aaaaa aaaa.com 1.2.3.22 mmm mmm.com So I want to add the word "search xxxx.com" in the beginning /etc/resolv.conf I tried Code: sed s/.*$/& search xxx.com/ /etc/resolv.conf But this one expects me to create (HowTos)