SeokjuLee / terminal-setup

Default settings for MobaXterm, tmux, XServer, SSH, caja, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
sudo netstat -anp | grep LISTEN | grep sshd
cat /etc/ssh/sshd_config | egrep ^\#?Port 
  • Edit config
vi /etc/ssh/sshd_config
# Port 22 -> Port 1234
  • Restart SSH
sudo service sshd restart
(or sudo service ssh restart)

[MobaXterm] XServer display setting

  • Change display offset as '11' in the MobaXTerm X Server setting
echo $DISPLAY
export DISPLAY=:11
echo $DISPLAY

[caja] display setting

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

Reference

About

Default settings for MobaXterm, tmux, XServer, SSH, caja, etc.


Languages

Language:Shell 100.0%