Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simply print the IP of the current host

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 myip
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 setup.py
README.md

myip - a simple tool for displaying the current IP

After 30 years of TCP/IP, it's about time to have a tool that simply displays an IP. The current popular tools (ifconfig, ip addr show) provide complex output and argument set, while usually we run them in order to simply get an answer to the question "which IP(s) are configured on this host?".

myip is intended to be used by both scripts and humans.

API may be added later.

Installing

sudo pip install myip

Uninstall using pip uninstall myip

Usage

myip - prints the primary IP.

myip --all - prints all IPs configured on the system

myip <iface name> - prints the IP of given interface, e.g. eth0.

License

Licensed under the MIT license.

Something went wrong with that request. Please try again.