Created
August 13, 2019 08:02
-
-
Save Subilan/5d98017454c7618560f7044714e89541 to your computer and use it in GitHub Desktop.
迅速获得当前服务器公网 IP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment