-1

I am working on a linux server remotely. Are there any command that can allow me to figure out the IP address of this linux server, so that I can ftp some files to this server.

  • 1
    maybe ifconfig? – tachomi Jul 8 '16 at 5:30
0

if the remote machine is directly connected to the internet:

hostname -I|cut -f1

otherwise, one of these:

wget -qO - http://whatsmyip.me/
wget -qO - http://ipinfo.io/ip
wget -qO - http://ipecho.net/plain; echo

In all cases, must be run on the remote machine.

0

To get the IP:

hostname -i

IP along with hostname:

host $HOSTNAME
  • This will actually just get the internal IP address. – HalosGhost Jul 12 '16 at 13:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.