LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to find static IP of the Linux server using command line (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-find-static-ip-of-the-linux-server-using-command-line-4175486684/)

unclesamcrazy 12-04-2013 01:11 AM

Quote:

Originally Posted by frankbell (Post 5074986)
Try this:

Code:

curl ifconfig.me
or this:

Code:

curl ifconfig.me/host
I heard about it on smlr.

Thank you frankbell, that is the exact thing I was searching.
I want to store the IP in variable and this is the perfect command even I have not to use sed or awk to detect only IP string because it prints only IP.

Thanks again.

Thanks suicidaleggroll

Sorry I did not see the link you sent to me, I saw only php code and it was not working for me but link gave the same solution.

Thank you to you too for getting my question.

borgy95 12-08-2013 12:07 PM

Quote:

Originally Posted by suicidaleggroll (Post 5074824)
That's exactly what the OP is looking for. He clearly does not want the machine's local IP, I don't know why people keep giving him instructions on how to retrieve what he's explicitly said he does not want.

Clearly it wasn't that clear if so many misunderstood him.


All times are GMT -5. The time now is 11:45 PM.