Last active
June 2, 2024 21:14
-
-
Save pH-7/241140810610ba5012f5 to your computer and use it in GitHub Desktop.
Get my server local IP (saver time if you change very often your machine) - https://github.com/HiDeaUp/hideaup.github.io
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
| ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can also use
ip addr showcommand if available (ipwill progressively replaceifconfigon Linux distributions).More info: https://www.redhat.com/sysadmin/ifconfig-vs-ip