Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
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.
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.
To get the IP:
IP along with hostname: