tmux

tmux常用命令

守給你的承諾、 提交于 2019-12-09 12:16:33
有些功能是需要通过后台进程一直运行或启动着的,就像frp穿透功能 在启用穿透之前,需要先启动会话,且保持终端连接关闭后,该穿透会话处于运行状态。 //启动新会话 1.tmux new -s frp //进行frp目录,进行启用穿透功能 2. cd ~/software/frp文件夹 ./frpc -c frpc.ini //关闭会话detached,进入终端,此时穿透会话仍然运行中 3.ctrt+b d ———————————————————————————————————————————— 4.在终端查看开启的会话 tmux ls 5.从终端进入某个会话 tmux a -t frp 6.销毁某个会话 tmux kill-session -t frp 来源: CSDN 作者: 雁听雨 链接: https://blog.csdn.net/weixin_37194611/article/details/103454349

Multiple tmux prefix key combos?

前提是你 提交于 2019-12-09 07:41:32
问题 I've got tmux setup just the way I like it, and my chosen key of prefix is `, because it's so quick and easy to use. Everything was gravy until I tried using tmux from my phone, which doesn't have a ` key. Is there anyway to additionally bind ^a to the prefix, so I can use BOTH combos at the same time? 回答1: Starting with tmux 1.6, you can use the session option prefix2 to specify a second prefix key (e.g. in ~/.tmux.conf ): set-option -g prefix ` set-option -g prefix2 C-a Note: If you have

Switch between sessions in tmux?

时光怂恿深爱的人放手 提交于 2019-12-09 07:36:41
问题 I'm relatively new to tmux and use it just for local development. In some tmux tutorials, a person will list out their tmux sessions in an enumerated list. There is yellow highlight typically. Does anyone know what I'm talking about and how to do it? Secondly, would you say this is best practice? I'm over here with 8 iTerm2 tabs open :( Here's a screenshot of what I'm looking for: 回答1: C-b s found it! Alex's answer is awesome as well. Note C-b is my prefix, your prefix could be something else

How Do I set window title color in tmux 2.9a?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-09 03:56:15
问题 Following the upgrade to tmux version 2.9a, I had to update my configuration file as some of the settings had name changes. The colors for the window title section of my status bar no longer work. Here is that part of my configuration file: # set color for status bar set-option -g status-style bg=colour235 set-option -g status-style fg=yellow set-option -g status-style dim # set window title list colors set-window-option -g window-status-style fg=brightblue set-window-option -g window-status

iTerm 2 not honoring key bindings declared in .tmux.conf

感情迁移 提交于 2019-12-08 17:06:52
问题 I am using the latest stable version of iTerm2 (2.0) with the latest Homebrew build of tmux (1.9a). Unfortunately, my keybindings as declared in .tmux.conf do not work with the iTerm2/tmux combo in "integrated mode" (i.e. when iTerm2 takes over the management of tmux windows and panes). I tried different prefixes (C-b, M-a) as well as different key mappings in iTerm, but to no avail. Is this indeed an iTerm bug? Or is my expectation that the .tmux.conf keybindings would be carried over to

tmux: how to adjust the tmux session's width to fit in the terminal panel?

房东的猫 提交于 2019-12-08 07:37:35
问题 when I re-attach a tmux session, the width of the tmux window is still the previous width and padded with white dots: So my question is how to adjust the tmux width to fit in the terminal panel? The ideal setting would be the tmux session's width is auto-adjusted whenever re-attached. PS: I am using iterm2 on mac. EDIT: This is actually answered here: https://stackoverflow.com/a/19280187/1464263 回答1: Seems like you have another client attached to this session and it's screen width is half

Can tmux save commands to a file, like .bash_history?

◇◆丶佛笑我妖孽 提交于 2019-12-07 01:23:04
问题 Does tmux support saving to a file the commands typed in "C-b :" mode ? I'd rather look through the ones I already typed than have to look each command up in the man page. 回答1: There is history-file option which does what you are looking for. history-file path If not empty, a file to which tmux will write command prompt history on exit and load it from on start. Add this to your .tmux.conf set -g history-file ~/.tmux_history Note it was added in 2.1 version. if you have older version of tmux

TMUX: how to make new window stay when start shell-command quits?

对着背影说爱祢 提交于 2019-12-07 00:30:11
问题 In tmux command mode, the following creates new window and opens vim inside: :new-window vim When you quit vim, the window is also closed. Is there a way to make it stay? 回答1: tmux has an option for this: remain-on-exit : tmux set remain-on-exit on 回答2: I realise this is a long dead question. But I'm a recent user of tmux and I had this same question. It turns out that you might want to do this: tmux new-session bash -l That gets you a bash window (login shell). Then, run whatever commands

Tmux .tmux.conf doesn't load properly [closed]

倖福魔咒の 提交于 2019-12-07 00:19:32
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I'm a new Tmux user. I have a .tmux.conf file with a bunch of settings, but when I try to source the file it throws a bunch of errors. ############ # Settings # ############ # http://alexyu.se/content/2012/04/tmux-and-irssi-sitting-tree # Define default shell set -g default-command /bin/zsh # Start numbering at

Share history between panes/windows

醉酒当歌 提交于 2019-12-06 23:25:24
问题 Is there a way to share the shell command history between panes/windows in a tmux session? 回答1: shell history has precious little to do with tmux, it has to do with the shell you are using. So if you chose to use zsh it is enabled iirc by default. With bash you need to add some magic to your .bashrc export PROMPT_COMMAND="history -a; history -n" this appends your last command to history and reloads your history after each command. See this post for more information. 回答2: Add these options to