Can I use a command (such as "tree") without installing it system wide?

tree doesn't seem to have particular dependencies (libc6) so I guess you can simply copy the executable (located in which tree on another system with tree installed or alternatively you can compile it from source, here's the home page of the project) in a directory on the Linux box which you're connected, say ~/bin/, then you just need to update your $PATH environment variable to add that directory.

If you're using Bash put this in your ~/.bashrc:

PATH=$PATH:~/bin/

Note: Be sure to match architecture and OS.


cd $HOME
# download latest tree source to home directory
wget http://mama.indstate.edu/users/ice/tree/src/tree-1.7.0.tgz
# unpack
tar xzfv tree-1.7.0.tgz
cd tree-1.7.0/
make
# install to $HOME directory
make install prefix=$HOME/bin
# this will create folders bin, and man
cd $HOME
# remove original source folder
rm -rf tree-1.7.0

# run tree
$HOME/bin/tree
# view man page
$HOME/man tree