Network setup
Chris Green
cl at isbd.net
Thu Jan 14 16:13:04 UTC 2016
On Thu, Jan 14, 2016 at 04:51:48PM +0100, Tom H wrote:
> On Thu, Jan 14, 2016 at 4:25 PM, Chris Green <cl at isbd.net> wrote:
> > On Thu, Jan 14, 2016 at 09:14:05AM -0600, W Scott Lockwood III wrote:
> >> On 1/14/2016 6:18 AM, Chris Green wrote:
> >>>
> >>> It's not even very obvious from the default help given by 'ip' how I
> >>> would simply ask for the same information that 'ifconfig' gives me.
> >>
> >> ip addr
> >
> > Thanks, at least I know now. How I would be able to work that out from:-
> >
> > Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }
> > ip [ -force ] -batch filename
> > where OBJECT := { link | addr | addrlabel | route | rule | neigh | ntable |
> > tunnel | tuntap | maddr | mroute | mrule | monitor | xfrm |
> > netns | l2tp | tcp_metrics | token }
> > OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |
> > -f[amily] { inet | inet6 | ipx | dnet | bridge | link } |
> > -4 | -6 | -I | -D | -B | -0 |
> > -l[oops] { maximum-addr-flush-attempts } |
> > -o[neline] | -t[imestamp] | -b[atch] [filename] |
> > -rc[vbuf] [size]}
> >
> > ... is anybody's guess. :-)
>
> There's no guessing involved.
>
Hmm, the 'guess' above is idiomatic, not to be taken literally!
> >From the above, you look up "OBJECT" further down:
>
> IP - COMMAND SYNTAX
> OBJECT
> address
> - protocol (IP or IPv6) address on a device.
>
> Further down:
>
> The names of all objects may be written in full or abbreviated form,
> for example address can be abbreviated as addr or just a.
>
How does that help? I'm wanting to get some information about my
network interfaces and I'm told 'ip' is the command I need. So I
enter 'ip' and get the above help text. There's nothing to indicate
that 'ip a[ddr]' will do what I want. How am I meant to know (or work
out) that giving the command an 'OBJECT' of 'addr' will produce output
relating to my network interfaces?
> >From the above, you look up "COMMAND" further down:
>
As I understand it 'ip a' doesn't have a 'COMMAND', presumably it's
doing the default show/list (which is reasonable), it's a pity though
that there isn't a default for the OBJECT as well.
>
> "ip" has far more features than "ifconfig". Tools with many options
> have complex man pages; take a look at "man ps" or "man nmap".
>
Yes, I know, I use nmap and the man page is mind boggling.
I think a couple of examples (many man pages do provide examples)
would be worth many, many, lines of description. Plus a default
output similar to that from ifconfig with no parameters would be very
useful.
--
Chris Green
More information about the ubuntu-users
mailing list