How to config ipaddress in text mode?

I have flashed os into tx1, and failed to install cuda8 by jetPack2.3.1.I haven't got a hdmi display ,so I have to config ip by J21 uart. It still doesn't work after a lot try.
How to How to config ip address and nameserver in text mode?

Normally the system runs DHCP, so any admin type info you get on dhcp under Linux should be correct (including Ubuntu admin). For command line, you could list interfaces with “ifconfig”, and could get DHCP to query a server via “dhclient”. You would have an advantage if the DHCP server has logs you can monitor as the DHCP request goes out, e.g., a router with a web interface to logs, or another Linux box dmesg.

Some additional info could be useful: You’ll find “systemd” controls networking services (at least part of this), and has the “systemctl” command to interface. Example:

sudo -s
# query if the service is set to run.
systemctl status networking.service
# restart networking.
systemctl restart networking.service
# stop networking.
systemctl stop networking.service
# start networking from stopped.
systemctl start networking.service
# Tell DHCP to ask for an address (if a lock file already exists it won't do anything):

Thank you. I managed to get a display which have a hdmi interface . then set the ip in window-format.