LoginSignup
9
8

More than 3 years have passed since last update.

Ubuntu 16.04 での 最新 tmux 導入手順

Last updated at Posted at 2017-12-30

はじめに

tmux 2.4 から 後方非互換のコマンドオプションが入り、Ubuntuのデフォルトのパッケージリポジトリのtmuxが古いことにより、tmuxの実行時に usage: send-keys [-lRM] [-t target-pane] key ... というwarningが実行時に出るようになったため、最新のtmuxのビルドを使用することでこの問題を解決した。

ここではその時に行ったtmuxのビルドと設定方法について記述する

最新の tmux のビルド・設定方法

tmux は github上で開発が行われているため、masterのブランチをビルドして適当なbinディレクトリに配置するだけで良い。

Ubuntu 16.04 では、build-essentials と automakeが必要になる。

srcコードは $HOME/src/tmux で管理し、 バイナリは $HOME/bin/tmux に配置する。

以上を踏まえると、以下のコマンドを実行することで、tmuxのビルドと設定ができる。

sudo apt update 
sudo apt install -y build-essential automake libevent-dev ncurses-dev pkg-config bison
mkdir -p $HOME/src
mkdir -p $HOME/bin
cd $HOME/src && git clone git@github.com:tmux/tmux.git
cd $HOME/src/tmux && sh autogen.sh && ./configure && make 
cp $HOME/src/tmux/tmux $HOME/bin/
echo 'export PATH=$HOME/bin:$PATH' >> $HOME/.bashrc
source $HOME/.bashrc
9
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
8