Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.networking > #1221
| From | J G Miller <miller@yoyo.ORG> |
|---|---|
| Newsgroups | comp.os.linux.networking |
| Subject | Re: How to know if eth0 is up? |
| Date | 2012-03-30 21:12 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <jl57jn$7md$3@dont-email.me> (permalink) |
| References | <4f75f0eb$0$19106$426a34cc@news.free.fr> |
On Friday, March 30th, 2012, at 17:44:11 +0000, FAB wrote:
> I'd like to know if there is a command line instruction or a /proc/
> entry that tells reliably if a cable is hooked in an ethernet port
> (typically, to know at boot if I must use my dhcp client on eth0, or
> look for a WIFI cell).
Which is quite a different thing to your "subject" which could be
answered perhaps with
ifconfig eth0 | egrep 'UP' | egrep 'RUNNING'
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
As others have suggested perhaps
ethtool eth0 | egrep "Link detected"
Link detected: yes
--
The Paul Ryan Budget -- Robs from the poor and gives to the rich.
Back to comp.os.linux.networking | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to know if eth0 is up? <fab@slick.airforce-one.org> - 2012-03-30 17:44 +0000
Re: How to know if eth0 is up? Chris Davies <chris-usenet@roaima.co.uk> - 2012-03-30 19:33 +0100
Re: How to know if eth0 is up? Bit Twister <BitTwister@mouse-potato.com> - 2012-03-30 19:57 +0000
Re: How to know if eth0 is up? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-03-31 21:22 +0000
Re: How to know if eth0 is up? J G Miller <miller@yoyo.ORG> - 2012-03-30 21:12 +0000
Re: How to know if eth0 is up? Mark Evans <mpe@anacon.freeserve.co.uk> - 2012-04-05 19:07 +0100
csiph-web