Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I am currently running centOS in text mode from my Vbox and wanted to know how to connect to the internet. I gave all the info during the install ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Location
    Kolkata, India
    Posts
    14

    Question connect CentOS(text mode) to Internet


    Hi,

    I am currently running centOS in text mode from my Vbox and wanted to know how to connect to the internet. I gave all the info during the install but it does not seem to be working. So which command or commands should i use to connect the internet from my ethernet connection?

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Are you using DHCP? If so, quick answer is
    Code:
    su -
    dhclient eth0
    Long answer: Howto Red hat enterprise Linux 5 configure the network card

  3. #3
    Just Joined!
    Join Date
    Apr 2010
    Location
    Kolkata, India
    Posts
    14

    Re:

    No unfortunately i am not using dhcp. I need to specify an ip adddress and the mask and the gateway with the dns........ wonder what the command could be.

  4. #4
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    The link I posted shows you how to edit the network script /etc/sysconfig/network-scripts/ifcfg-eth0

    With ifconfig you can do
    Code:
    ifconfig eth0 <ip address> netmask <netmask> up
    and set the gateway with
    Code:
    route add default gw <gateway address>
    And DNS can be set up in /etc/resolv.conf

  5. #5
    Just Joined!
    Join Date
    Apr 2010
    Location
    Kolkata, India
    Posts
    14

    Re:

    Oops that worked..... thank you so much!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •