Change Linux networking from command line

Change Hostname and/or IP Address both temporarily and permanently


Using vi to modify text files in Linux

sudo vi /etc/hosts

Wait for file to be displayed; navigate file using arrow keys.

Use i to enter edit mode and Escape to exit edit mode.

Use :wq! <enter> to save and close.

Use :q! <enter> to close without saving.