Shell command to get server IP [duplicate]
This question already has an answer here:
Shell Command for Getting IP Address? 15 answers
What command can I run on a linux server to get just the ip address back.
I know I can run ifconfig eth0, but trying to parse the output and grep
just the ip is quite nasty. Is there a command or elegant solution just to
get back the ip address?
No comments:
Post a Comment