Skip to content

Instantly share code, notes, and snippets.

@msabramo
Last active December 11, 2023 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msabramo/943e9008e0c040a90559ee1012a1f6b7 to your computer and use it in GitHub Desktop.
Save msabramo/943e9008e0c040a90559ee1012a1f6b7 to your computer and use it in GitHub Desktop.
Install tmux in a barebones Ubuntu environment without root (like a Docker container for Ethos)
#!/bin/sh
TMUX_ROOT=~/tmux
# Install tmux in a barebones Ubuntu environment without root (like a Docker
# container for Ethos)
apt-get download tmux libutempter0 libevent-core-2.1-7 ncurses-base
for deb in *.deb; do
dpkg -x ${deb} ${TMUX_ROOT}
done
cp -pr ${TMUX_ROOT}/lib/terminfo ~/.terminfo
if [ ! -f ~/.bashrc ]; then
echo TMUX_ROOT=${TMUX_ROOT} > ~/.bashrc
echo 'alias tmux="LD_LIBRARY_PATH=${TMUX_ROOT}/usr/lib/x86_64-linux-gnu ${TMUX_ROOT}/usr/bin/tmux"' >> ~/.bashrc
fi
echo
echo "PATH modified in ~/.bashrc -- Run:"
echo
echo " source ~/.bashrc"
echo
echo "or log out and back in for it to take effect."
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment