what is used for knowing its own ip address
Although the answer seems to be correct but as for the command, its actually: "ifconfig" in unix/linux machines and "ipconfig" in windows!