myip

command module
v1.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

README

myip

Command line utility for displaying public and private IP addresses.

release-badge circleci-badge codacy-badge

NAME:
    myip – list IP addresses.

SYNOPSIS:
    myip [ opts... ]

OPTIONS:
    -h, --help          # Show usage.
    -a, --all           # Same as -e|--ethernet, -l|--loopback, -p|--public (default).
    -l, --loopback      # Print (IPv4/IPv6) (l)oopback IP address.
    -e, --ethernet      # Print (IPv4/IPv6) (e)thernet IP address.
    -p, --public        # Print (IPv4/IPv6) public IP address.
    -v, --version       # Show version number.

EXAMPLES:
    myip -a             # list all IP addresses.

Installation

Golang
$ go get -u github.com/clarketm/myip
Source (Mac/Linux)
# List of builds: https://github.com/clarketm/myip/releases/

$ BUILD=darwin_amd64.tar.gz     # Mac (64 bit)
# BUILD=linux_amd64.tar.gz      # Linux (64 bit)

$ BIN_DIR=/usr/local/bin        # `bin` install directory
$ mkdir -p $BIN_DIR

$ curl -L https://github.com/clarketm/myip/releases/download/v1.4.1/$BUILD | tar xz -C $BIN_DIR        # install
Source (Windows)

Usage

Basic usage
$ myip


Ethernet (IPv4): 10.0.0.1
Ethernet (IPv6): fe80::22:a379:7bff:9092, fe80::aede:48ff:fe00:1122

Loopback (IPv4): 127.0.0.1
Loopback (IPv6): ::1, fe80::1

Public (IPv4): 71.217.233.188

You can see the full reference documentation for the myip package at godoc.org, or through go's standard documentation system:

$ godoc -http=:6060

# Open browser to: "http://localhost:6060/pkg/github.com/clarketm/myip"  to view godoc.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL