Connect your android on Ubuntu in recovery mode, fastboot mode, or unactivated

To boot into recovery mode: Press and hold Home + Power
To boot into fastboot mode: Press and hold Camera + Power

Setup UDEV to recognize your HTC Android device:

Setting up UDEV to recognize HTC Device –
Open up terminal and type:
sudo gedit /etc/udev/rules.d/51-android.rules
Add the following:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
save and close.
sudo /etc/init.d/udev restart

Installing adb & fastboot:

Download the Android SDK here.
Extract it to the root or home directory.
Download fastboot and place it in the /AndroidSDK/tools directory.
Right click fastboot -> Properties -> Permissions -> Allow executing file as program.

Adding tools directory to bash:

sudo gedit /home/user/.bashrc
Add the location of you tools directory:
#AndroidDev PATH
export PATH=${PATH}:/AndroidSDK/tools

close and save.

I got most of this information from this post.