Last active
December 11, 2023 21:46
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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