Project

General

Profile

Bug #3013

ifconfig with no args should list all interfaces

Added by Joshua M. Clulow about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2012-07-20
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

It's 2012 and high time for ifconfig without arguments to default to the same behaviour that every other modern UNIX platform exhibits. That is: ifconfig should print a list of all interfaces as if the user had typed ifconfig -a.

This change will not alter any other existing behaviour, including preserving the behaviour of -a without other arguments. It will bring us into line with at least the following other platforms: OpenBSD, Mac OS X, Linux.

History

#1

Updated by A Hettinger about 8 years ago

Does OBSD or OS 10.x deal with the difference between plumbed vs. unplumbed interfaces (I already know linux does not)? If so, how?

Our ifconfig -a does not print all interfaces, only all plumbed interfaces, so rather then eleminating the suprise, it only makes it MORE suprising because the information returned is not the same. The present state atleast makes it clear to the user they do not know how ifconfig works, the proposed change gives the false impression the user does.

#2

Updated by Rich Lowe about 8 years ago

There's no distinction between plumbed and unplumbed here, you just make 'ifconfig' act equivalently to 'ifconfig -a'. Which is what people actually expect.

The rest of it is a function of dladm, etc.

#3

Updated by Michael Zeller about 8 years ago

The default on linux is to display all "up" interfaces. The "-a" will show all interfaces even if they are currently down.

#4

Updated by Albert Lee about 8 years ago

  • Status changed from New to Resolved
  • Assignee set to Gary Mills
  • % Done changed from 0 to 100

Fixed in:
changeset: 13769:2317a7492de4
tag: tip
user: Daniil Lunev <>
date: Tue Jul 31 21:33:14 2012 +0000
files: usr/src/cmd/cmd-inet/usr.sbin/ifconfig/ifconfig.c usr/src/man/man1m/ifconfig.1m
description:
3013 ifconfig with no args should list all interfaces
Reviewed by: Garrett D'Amore <>
Reviewed by: Gary Mills <>
Approved by: Albert Lee <>

Also available in: Atom PDF