LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to connect to the Internet using command (https://www.linuxquestions.org/questions/linux-networking-3/how-to-connect-to-the-internet-using-command-276561/)

dxoxb 01-11-2005 11:22 AM

How to connect to the Internet using command
 
I am very very new to linux and are trying to set up a barebone system for my server. I intend to install a software and the vendor actually asked me to install gcc (and really i dun hv any clue what is it) Anyway the command is

up2date -u gcc

It runs alright but end with a error message that says urlopen error

I suspect it was because I did not set up my server to connect to the Internet.

IS there a command to connect to the Internet?

syl20 01-11-2005 11:34 AM

It depends on what you mean about connect to the Internet.
If you want a http browser, you have lynx or links.
Are you able to ping a website?
To reach the Internet you need an IPaddress (ifconfig ethX IP) or you use dhcp, a DNS server (/etc/resolv.conf), one default route (route add default gw IPaddress dev ethX). ethX is the interface that is connect to the Internet.
You don't need gw IPaddress if you are at home.

dxoxb 01-11-2005 11:43 AM

syl20 Thanks for the reply :) appreciate it

I pull a cable from the ADSL router (It is connected to the Internet) to plug into the networkward of this fedora core 3 machine. And this is a barebone system that do not hv a broswer. It is all command prompt.

What shoud I do

syl20 01-11-2005 11:52 AM

You need to tell the fedora sytem that the default route is on dev ethX (interface connected to the ADSL router), and the DNS (from your provider) in /etc/resolv.conf)
Lynx and links allow you to browse the Internet without having KDE or Gnome, it's just work on line command. (man lynx, man links)
You don't answer my question about ping.

BinaryBob 01-11-2005 02:17 PM

What is the output if you put in
Code:

ping -c 5 google.com
Does it say "Reply from .... " 5 times? or something else?

dxoxb 01-11-2005 08:41 PM

Ok, I hv managed to ping google. looks like it is working now. Thanks guy :)


All times are GMT -5. The time now is 06:30 AM.