tmux: hangs and do not load, and do not respond to any option command
Had a similar issue, where I had a tmux session with two buffers. I didn't see anything I typed, but when I switched between buffers what I had typed previously would appear onscreen. stty sane
didn't work.
I detached Ctrl-b+d, and noticed that there was still a client attached when I looked at tmux list-clients
. tmux detach-client
removed it, and then I could reattach and the everything worked again.
If it is ok to lose your sessions, try deleting the tmux-NNNNNNN
directory, where NNNNNNN
is a number, under your /tmp
directory. According to the tmux
manual, if the TMPDIR
environment variable is set, the tmux-NNNNNNN
will be put in the TMPDIR
.
tmux stores the server socket in a directory under /tmp (or TMPDIR if set);
This solved my problem of not being able to run tmux
commands that are related to sessions. I also tried the following, but they did not work:
killall -9 tmux
- reinstall
tmux
- restart shell session
I could not easily restart the operating system, because it's a shared server managed by others.
I had faced this problem for a long time and after a bit of searching I figured out that this was being caused because I accidently hit Ctrl+S (Ctrl+A+S is my shortcut for switching panes), and this turns off flow control in terminals and stops the terminal from accepting input. It can be reenabled by pressing Ctrl+Q.
Source: https://superuser.com/a/553349/137226
tmux
was halting right after I started it. Ctrl-Q and Ctrl-C didn't do anything.
Fixed with
killall -9 tmux
(May be a different problem, but this question showed up in Google.)