sudo nano /etc/network/interfaces
It will bring up the file you need to edit.
Add what you want to the bottom of file.
Then save file this way:
Hold Ctrl key down and hit o not zero
Release Ctrl key and hit Enter
Hold Ctrl key down and hit x
The file is now saved with the added info.