15

I wanted to install tmux in a redhat 6 machine using yum, however this fails as I don't have root access. Any idea on how to install tmux locally without root access?

Ameida
  • 153

3 Answers3

22

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
Levon
  • 596
11

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)
Aaron
  • 226
  • 2
  • 7
4

I found this repository very useful.

You just download the appimage and alias tmux to the appimage. Done. Hope it works also for your distro. For me it works in CentOS8.