How to update and older version of electrum on ubuntu 17? I used the following commands to install electrum:


sudo apt-get install python3-setuptools python3-pyqt5 python3-pip
sudo pip3 install https://download.electrum.org/3.0.5/Electrum-3.0.5.tar.gz


For latest tar files: https://electrum.org/#download

In the future, how would I go about updating electrum? What command would I use to update?

Also, where are the electrum files installed that contains my private keys and wallet?
how would I go about updating electrum? What command would I use to
  update?


There are couple of ways to do it:


If you downloaded the official package (tar.gz), you can run electrum from its root directory, without installing it on your system; all the python dependencies are included in the 'packages' directory. To run Electrum from its root directory, just do: ./electrum
There is also PPA package repository, but I think they didn't update it.
I've a shell script, this script check the github source, download the last version and save the backup of an old wallet. You can find it here.



  where are the electrum files installed that contains my private keys
  and wallet?


On the Linux machine, there is the folder ~/.electrum which contains your wallet, configs and other.