项目作者: SeokjuLee

项目描述 :
Default settings for MobaXterm, tmux, XServer, SSH, caja, etc.
高级语言: Shell
项目地址: git://github.com/SeokjuLee/terminal-setup.git
创建时间: 2018-02-26T07:26:10Z
项目社区:https://github.com/SeokjuLee/terminal-setup

开源协议:

下载


Cheat sheet for tmux

For my little brains.

Seokju modified on (17.12.26)

Out session (@ original shell)

action command
create session tmux new -s [session-name]
kill session tmux kill-session -t [session-name]
attach session tmux attach -t [session-name]
rename session tmux rename-session -t [old-name] [new-name]
list session tmux ls

In session

action command
create window ^b + c
rename window ^b + ,
navigate window ^b + n
^b + p
^b + l
^b + [window-num]
terminate window ^b + &
tmux kill-window -t [window-num]
detach session ^b + d
help ^b + ?
apply tmux.conf tmux source-file ~/.tmux.conf

In window / pane

action command
split pane ^b + %
^b + "
delete pane ^b + x
^d (no warning)
select pane ^b + arrow_key
resize pane ^b + <M-arrow_key>
maximize pane ^b + z

Color

color code

fix vim in tmux color problem

  • add export TERM=xterm-256color in ~/.bashrc
  • add set t_ut= in ~/.vimrc
  • add setw -g xterm-keys on and set -g default-terminal "screen-256color" in ~/.tmux.conf

Useful apps

  • mobaxterm: xwindow. SCP is faster than SFTP when synchronizaing files.
  • WinSCP
  • SublimeText SSH
  • SSHFS: Sync a directory with Windows one such as DropBox
  • Xfe
  • caja (default)

Change SSH port

  • Check current port
    1. sudo netstat -anp | grep LISTEN | grep sshd
    2. cat /etc/ssh/sshd_config | egrep ^\#?Port
  • Edit config
    1. vi /etc/ssh/sshd_config
    2. # Port 22 -> Port 1234
  • Restart SSH
    1. sudo service sshd restart
    2. (or sudo service ssh restart)

[MobaXterm] XServer display setting

  • Change display offset as ‘11’ in the MobaXTerm X Server setting
    1. echo $DISPLAY
    2. export DISPLAY=:11
    3. echo $DISPLAY

[caja] display setting

  1. sudo gsettings set org.mate.caja.preferences default-folder-viewer 'list-view'
  2. sudo gsettings set org.mate.caja.list-view default-zoom-level 'smallest'
  3. sudo gedit /usr/share/applications/caja.desktop
  4. (Set X-MATE-AutoRestart=false)

Reference