Ubuntu 无Root权限 安装Tmux

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ubuntu 无Root权限 安装Tmux相关的知识,希望对你有一定的参考价值。

参考技术A     [1]  Linux终端复用神器-Tmux使用梳理

    [2]  linux无root权限安装tmux  

    [3]  tmux 终端复用详解

sh 用于安装没有root访问权限的tmux的bash脚本

#!/bin/bash

# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.

# exit on error
set -e

TMUX_VERSION=1.8

# create our directories
mkdir -p $HOME/local $HOME/tmux_tmp
cd $HOME/tmux_tmp

# download source files for tmux, libevent, and ncurses
wget -O tmux-${TMUX_VERSION}.tar.gz http://sourceforge.net/projects/tmux/files/tmux/tmux-${TMUX_VERSION}/tmux-${TMUX_VERSION}.tar.gz/download
wget https://github.com/downloads/libevent/libevent/libevent-2.0.19-stable.tar.gz
wget ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz

# extract files, configure, and compile

############
# libevent #
############
tar xvzf libevent-2.0.19-stable.tar.gz
cd libevent-2.0.19-stable
./configure --prefix=$HOME/local --disable-shared
make
make install
cd ..

############
# ncurses  #
############
tar xvzf ncurses-5.9.tar.gz
cd ncurses-5.9
./configure --prefix=$HOME/local
make
make install
cd ..

############
# tmux     #
############
tar xvzf tmux-${TMUX_VERSION}.tar.gz
cd tmux-${TMUX_VERSION}
./configure CFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS="-L$HOME/local/lib -L$HOME/local/include/ncurses -L$HOME/local/include"
CPPFLAGS="-I$HOME/local/include -I$HOME/local/include/ncurses" LDFLAGS="-static -L$HOME/local/include -L$HOME/local/include/ncurses -L$HOME/local/lib" make
cp tmux $HOME/local/bin
cd ..

# cleanup
rm -rf $HOME/tmux_tmp

echo "$HOME/local/bin/tmux is now available. You can optionally add $HOME/local/bin to your PATH."

以上是关于Ubuntu 无Root权限 安装Tmux的主要内容,如果未能解决你的问题,请参考以下文章

硬盘安装ubuntu 12.04时提示无sudo命令怎么办?我的电脑是win7系统,想学习linux。请帮帮忙~

最近装了ubuntu,安装时注册的用户不是root ,安装某些软件时提示权限问题,请问怎么添加一个root用户呀

linux 普通用户如何安装软件(无root权限,不知道root密码)? 别回答切换到root或者给用户root权限之类的。

virtualbox 安装ubuntu 时,看不到继续退出按钮?共享文件无权限?

linux无root权限安装screen

新手求助,请问怎么在ubuntu桌面版下获得root权限