Go to, https://dist.ipfs.io/#go-ipfs, and download the software for your platform. For Ubuntu Linux, the file is named go-ipfs_v0.4.18_linux-amd64.tar.gz.
Extract this using the following command line:
$ tar xvfz go-ipfs_v0.4.18_linux-amd64.tar.gz
Then, install the binary using the following command:
$ cd go-ipfs
$ sudo ./install.sh
This step is optional. Here, we export the IPFS_PATH environment variable to our shell:
$ export IPFS_PATH=/path/to/ipfsrepo
This is where the ipfs stores the files. You can store this statement in ~/.bashrc. By default (without this environment...