One of the first questions many new Linux system administrators face is getting the IP address. This article explains the most used ways for finding a Linux system’s public and private IP addresses using the command line.
Source: LXer – How to Find/Get IP Address in Linux Using Command Line