Announcement

Collapse
No announcement yet.

How do I detect an internet connection using linux?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do I detect an internet connection using linux?

    I did it once but don't remember how, thanks

    #2
    Re: How do I detect an internet connection using linux?

    If you mean detecting wireless access points (APs) within range of your wireless router/adapter, your running 'network manager' will show you them.
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: How do I detect an internet connection using linux?

      ping google

      Please Read Me

      Comment


        #4
        Re: How do I detect an internet connection using linux?

        What Snowhog and oshunluvr said. But it depends on what connection you want to detect. Here's a longer version. On the command line, type ping and what you hope to be connected to. If you want to know if you are connecting with your router, type "ping 192.168.1.1" or whatever your gateway setting is. If you want to see if you are connected to your ISP type "ping isp.com" or whatever your ISP address is. If you want to know if your ISP is connected to the rest of the world, and hence if you can, then type "ping google.com". If you don't have your DNS (domain name server) setting right, or it doesn't work, then the above names won't work and you will have to use numbers only. So, there's a start on troubleshooting.

        Comment


          #5
          Re: How do I detect an internet connection using linux?

          Do a
          man netstat
          and learn of many ways to see internet connections.
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            Re: How do I detect an internet connection using linux?

            Okay so it will be an ethernet cable from a router I'm using, but I thought there was just something to click on that would search for the connection and then guide you through setting it up? Or will that happen after I ping?

            Comment


              #7
              Re: How do I detect an internet connection using linux?

              Originally posted by KudosMatrix7
              Okay so it will be an ethernet cable from a router I'm using, but I thought there was just something to click on that would search for the connection and then guide you through setting it up? Or will that happen after I ping?
              Oh... you want help in setting up your Internet connection or determining of you have one. If you have plugged an ethernet cable from the back of a router (wireless?) to the eth port on your box, you *should* have an Internet connection automatically. Just run FireFox or Konqueror and click on one of the default web pages stored in their bookmark. Or, put in www.google.com into the URL line and hit the Enter Key.

              If your browser can't find any online website then either the dhcpd isn't running or your /etc/reslov.conf file is not properly populated. Open a konsole and run
              ifconfig

              Paste the results in your next message.
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #8
                Re: How do I detect an internet connection using linux?

                eth0

                Link encap:Ethernet HWaddr 00:30:1b:3d:50:dl
                UP BROADCAST MULTICAST MTU: 1500 Metric:1
                RX packets: 0 errors:0 dropped:0 overruns:0 frame:0
                TX packets: 0 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000
                RX bytes:0 (0.0 B) TX bytes:0 (0.0B)
                Interrupt:11 Base address:0x2000

                lo

                Link encap: Local Loopback
                inet addr:127.0.0.1 Mask:255.0.0.0
                inet6 addr: ::1/128 Scope:Host
                UP LOOPBACK RUNNING MTU:16436 Metric:1
                RX packets:50 errors:0 dropped:0 overruns:0 frame:0
                TX packsts:50 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:0
                RX bytes: 3100 (3.1 KB) TX bytes:3100 (3.1 KB)

                Comment


                  #9
                  Re: How do I detect an internet connection using linux?

                  Is your ethernet cable coming from the back of your (wireless?) router,, which is attached to a modem from your ISP?

                  If so, check to see that /etc/network/interfaces contains

                  auto eth0
                  iface eth0 inet dhcp
                  If it doesn't then add it. (kdesudo kwrite /etc/network/interfaces)

                  Secondly, check to make sure that your Systemsettings --> Network and Connectivity --> Network Settings --> Proxy --> "Connect to the Internet Directly" is checked.


                  Then,

                  ifconfig eth0 up

                  Or, assuming that you still have the default network connecting tool, KNetworkManager, installed (and setting in your system tray?), you can run it and configure the eth connection.
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment


                    #10
                    Re: How do I detect an internet connection using linux?

                    Originally posted by GreyGeek
                    Is your ethernet cable coming from the back of your (wireless?) router,, which is attached to a modem from your ISP?

                    If so, check to see that /etc/network/interfaces contains

                    auto eth0
                    iface eth0 inet dhcp
                    If it doesn't then add it. (kdesudo kwrite /etc/network/interfaces)
                    All the hardware is hooked up and I when I put that in the terminal I got no such file or directory (despite me opening it up from the root and seeing it before my eyes) and that it failed trying to add /home/al/.config/ibus/bus and could not get ibus-daemon's address and finally /etc/network/interfaces is not logged in and when I tried again it said no such file or directory.

                    Secondly, check to make sure that your Systemsettings --> Network and Connectivity --> Network Settings --> Proxy --> "Connect to the Internet Directly" is checked.


                    Then,

                    ifconfig eth0 up

                    Or, assuming that you still have the default network connecting tool, KNetworkManager, installed (and setting in your system tray?), you can run it and configure the eth connection.
                    Connect to Internet directly is checked but when I type ifconfig eth0 up in the terminal it says Permission Denied. I opened KNetworkManager and tried to add a connection with connect automatically but that came to no avail as well.

                    Comment


                      #11
                      Re: How do I detect an internet connection using linux?

                      Theres a little green light that used to go on when I plugged ethernet in, should that go on whether or not there is a connection established? Maybe I have a bad ethernet?

                      Comment


                        #12
                        Re: How do I detect an internet connection using linux?

                        Originally posted by KudosMatrix7
                        Originally posted by GreyGeek
                        Is your ethernet cable coming from the back of your (wireless?) router,, which is attached to a modem from your ISP?

                        If so, check to see that /etc/network/interfaces contains

                        auto eth0
                        iface eth0 inet dhcp
                        If it doesn't then add it. (kdesudo kwrite /etc/network/interfaces)
                        All the hardware is hooked up and I when I put that in the terminal I got no such file or directory (despite me opening it up from the root and seeing it before my eyes) and that it failed trying to add /home/al/.config/ibus/bus and could not get ibus-daemon's address and finally /etc/network/interfaces is not logged in and when I tried again it said no such file or directory.
                        IF your system doesn't have /etc/network/interfaces then your system is severely messed up.

                        Secondly, check to make sure that your Systemsettings --> Network and Connectivity --> Network Settings --> Proxy --> "Connect to the Internet Directly" is checked.


                        Then,

                        ifconfig eth0 up

                        Or, assuming that you still have the default network connecting tool, KNetworkManager, installed (and setting in your system tray?), you can run it and configure the eth connection.
                        Connect to Internet directly is checked but when I type ifconfig eth0 up in the terminal it says Permission Denied. I opened KNetworkManager and tried to add a connection with connect automatically but that came to no avail as well.
                        Remember, when you do admin activity you must preface commands with sudo.
                        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                        – John F. Kennedy, February 26, 1962.

                        Comment

                        Working...
                        X