Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


how to edit and save this file ... !
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

how to edit and save this file ... !

shyaminayeshshyaminayesh Member
edited March 2013 in General

i want to change nameserver in my cent OS minimal installation, please tell me how to change and save this file step-to-step.

vi /etc/resolve.conf

after execute this it prompt a file to set nameservers, i added these two line to the file,

nameserver 8.8.8.8
nameserver 8.8.4.4

and now i want to save it ... please let me know how to save it,

thanks !

«1

Comments

  • NickMNickM Member
    edited March 2013

    lol vi

    Press ESC, then enter :wq and hit enter.

    In the future, you might want to use an editor that's easier to use than vi, such as nano.

  • HalfEatenPieHalfEatenPie Veteran
    edited March 2013

    Google is your friend. This can be done simply with a single Google Search.

    Regardless...

    after you're done adding the lines, press ESC (this will release you from the insert mode (i) and you'll be in command mode). Then type :wq and hit enter. If you want to force/override it you can type in :wq!.

  • Or press ESC then type ZZ

  • It's

    /etc/resolv.conf

    not

    /etc/resolve.conf

    :D

  • @NickM said: Press ESC, then enter :wq and hit enter.

    yeah ... it's working thank you,

    @budingyun : typing mistake, ;-)

    please anyone know why this problem prompt by cent OS minimal

    when i execute "yum -y install wget" it get this error ...

    could not retrieve mirrorlist ...

  • Use nano, it's easier

  • FreekFreek Member

    'yum install nano'
    'nano /etc/resolve.conf'
    CTRL+O
    CTRL+X
    (I am an Ubuntu user, this is from the top of my head, could be wrong tho).

  • krokro Member

    Dont hand feed... its already got a second issue.

    I would recommend a windows vps, and tinkering with linux as a desktop @ home perhaps

  • If it's hard to use vi, try install nano as Freek wrote :)

  • type rm / -rf and then start learning on a local vm.

  • vanarpvanarp Member
    edited March 2013

    I think you should stop offering hosting services until you feel much comfortable with Linux and the various services.

  • @shyaminayesh said: i want to change nameserver

    Your host should have already set nameservers for you when your OS was installed, or in the case of OpenVZ, when your container was created.

  • twaintwain Member

    I'm a shift zz man myself :)

  • perennateperennate Member, Host Rep

    emacs

  • Mon5t3rMon5t3r Member
    edited March 2013

    nano nano -w

  • Only i use joe ?

  • AmitzAmitz Member

    Isn't Joe a deprecated clone of Nano?

  • @marrco said: type rm / -rf and then start learning on a local vm.

    jeeez.

  • @Amitz no, joe is much better than nano. Or at least i like it much more.

  • mikhomikho Member, Host Rep

    my first run with Linux I used joe as editor... then I got lost in the world of windows for a few years and when I finally found my way back, I started to use nano instead.

  • while i am not a linux geek, i am comfortable with vi compared nano. may be i need to learn nano ;)

  • @shyaminayesh said: please anyone know why this problem prompt by cent OS minimal
    when i execute "yum -y install wget" it get this error ...
    could not retrieve mirrorlist ...

    i'm trying this in my local PC using vm ware ... any solution ... ?

  • budingyunbudingyun Member
    edited March 2013

    Try disabling fastest mirror plugin.

    vi /etc/yum/pluginconf.d/fastestmirror.conf
    

    save then "yum clean all"

  • @shyaminayesh said: i'm trying this in my local PC using vm ware ... any solution ... ?

    Can your vmware access the internet? Try to ping google, if it can connect to the internet, try to modify your sources.apt

  • @ErawanArifNugroho said: Can your vmware access the internet? Try to ping google, if it can connect to the internet, try to modify your sources.apt

    He's using CentOS/RHEL. :D

  • echo "nameserver 8.8.8.8" >/etc/resolv.conf
    echo "nameserver 8.8.4.4" >>/etc/resolv.conf
  • @ErawanArifNugroho : yes my other vm ware OS can access internet ... but cent os can't ping to the google.com .. it say's resolve error ... i think it can't resolve

    @budingyun said: Try disabling fastest mirror plugin.

    i'm try disabling ... but not yet working yum -y install wget

  • budingyunbudingyun Member
    edited March 2013

    @shyaminayesh Can't ping google mean you don't have internet connectivity. What your vmware network configuration? If using router, it's easier just using bridge.

  • @budingyun : i'm using vm ware 9 workstation & my internet connection is ADSL ... i'm using router ... but my other vm ware OS can access the internet ... :D

  • what do you use for networking: host-only, nat, or bridge ?

Sign In or Register to comment.