how to install tmux locally without root access?

Solution 1:

You will have to manually install it from source in your home directory and then add that to your path.

The process is straightforward enough and described in a few places, there is a script for V1.8 and a guide for V2.2. I would handrail off both but change everything to the latest version.

These scripts didn't work for me out the box, on step 6a, for version 6.0 nucrses I needed to use the command ./configure --prefix=$HOME/local CPPFLAGS="-P" instead of just ./configure --prefix=$HOME/local as per.

In summary, the process is:

  1. Make a temporary folder to work in
  2. Download the latest version of tmux. Follow the links to the dependencies and download those into your tempory directory.
  3. Setup a local library folder ($HOME/local)
  4. Setup a local binaries folder ($HOME/local/bin)
  5. extract the files (tar xvzf)
  6. Then for dependancies first and finnaly tmux:
    • configure (./configure --prefix=$HOME/local)
    • make
    • make install
  7. preappend to path (add this to .bashrc export PATH=$HOME/local/bin:$PATH)

Solution 2:

An alternative solution is to install miniconda (no sudo needed) via

$ wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
$ bash Miniconda3-latest-Linux-x86_64.sh

and then install tmux

$ conda install -c conda-forge tmux

also get a bonus htop

$ conda install -c conda-forge htop