For installing adb on ubuntu use following commands,
$ sudo apt-get install adb
Above command will also install android-libadb android-libbase android-libcutils android-liblog
$ which adb /usr/bin/adb
To install Fastboot on ubuntu use following command,
$ sudo apt-get install fastboot
Above command also installs ” android-libbacktrace android-libext4-utils android-libf2fs-utils android-libselinux android-libsparse android-libunwind android-libutils android-libziparchive fastboot libf2fs0 “
$ which fastboot /usr/bin/fastboot