All Projects â†’ picatz â†’ iface

picatz / iface

Licence: other
🕶 Cross-platform network interface command-line utility.

Programming Languages

go
31211 projects - #10 most used programming language

iface

Network interface command-line utility.

Tools like ifconfig, ip and ipconfig are awesome! But, sometimes they're just a little too much to parse -- or you just don't want to fuss with all of that. With iface, you get a clean, scriptable command-line utility that's lightweight, cross-platform, and easy to learn. Learn once, use everywhere!

Supported Platforms

Thanks to VBaczynski for helping test FreeBSD!

  • macOS
  • Linux
  • Windows
  • FreeBSD

Install

$ go get github.com/picatz/iface

Build from Source

Until I've figured out a better solution:

$ go get github.com/urfave/cli
$ git clone https://github.com/picatz/iface.git
$ cd iface
$ go build iface.go

Build iface.exe on macOS or Linux to run on a Windows box:

$ GOOS=windows GOARCH=386 go build iface.go

Example Usage

Get the first default ( non-loopback ) network interface:

This sort of simulates the LibPcap lookupdev function to get the default interface to capture packets on.

$ iface default

Get all of the network interface names available on the system:

$ iface names

Get network interface names with thier mac addresses:

$ iface macs

Get network interface names with their IP addresses:

$ iface ips

Command-line Interface

NAME:
   iface - network interface command-line utility

USAGE:
   iface [global options] command [command options] [arguments...]

VERSION:
   1.0.1

COMMANDS:
     names    all network interface names
     macs     network interfaces with their mac addresses
     mtus     network interfaces with their maximum transmission unit (mtu)s
     ips      network interfaces with their (local) ip addresses
     default  the first non-loopback network interface
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].