Published on

Reload Tmux Config using tmux source-file

Reload Tmux Config using tmux source-file

Tmux is one of the most useful tool when it comes to using using a linux terminal.

Tmux is a terminal multiplexer, it allows a user to access multiple terminals (or windows), each running a separate program, while providing a single screen to work on. Tmux is useful for running more than one command-line program at the same time, increasing productivity and the way you work.

Let's say you have made changes to tmux.conf file by adding or changing default config, you have to reload the config so that the changes reflects in your terminal. The command to reload config is called source-file.

Reload Tmux - Tmux Source Config

You have to reload tmux.conf so that it reflects-

tmux source-file ~/.tmux.conf

If you are inside a tmux session, you can run the command inside the tmux session to source the config file-

source-file ~/.tmux.conf

By default the prefix is Ctrl-B, so to reload the tmux conf you can run the following command-

source-file ~/.tmux.conf

Edit Tmux Config to create a shortcut - Ctrl-R

You can edit the tmux.conf file to create a keyboard shortcut Ctrl-R.

bind r source ~/.tmux.conf\\; display "~/.tmux.conf sourced!"

Going forward you can just do Ctrl-R in your tmux, and enjoy instant tmux reload.

I hope you found this article useful, glad that you found it easy to reload or source config in Tmux. You can also check out the complete tmux cheatsheet of keyboard shortcuts and mouse shortcuts.