目 录CONTENT

文章目录

Linux常用配置

smallkun
2023-03-10 / 0 评论 / 0 点赞 / 421 阅读 / 1,562 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2023-03-10,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我删除。

tmux

# 1 新建会话
alias tnew="tmux new -s "
# 2 分离会话(ctrl+a d)
alias tdetach="tmux detach"
# 3 列出会话(ctrl+a s)
alias tlist="tmux ls"
# 4 接入会话
alias tattach="tmux attach -t "
# 5 杀死指定会话
alias tkill="tmux kill-session -t "
# 6 杀死全部会话
alias tkillall="tmux kill-server"
# 7 切换会话
alias tswitch="tmux switch -t "
# 8 重命名会话(ctrl+a $)
alias trename="tmux rename-session -t "
# 9 窗口上下划分窗格
alias tsplitud="tmux split-window"
# 10 窗口左右划分窗格
alias tsplitlr="tmux split-window -h"
# 11 光标到上方窗格
alias tmoveu="tmux select-pane -U"
# 12 光标到下方窗格
alias tmoved="tmux select-pane -D"
# 13 光标到上方窗格
alias tmovel="tmux select-pane -L"
# 14 光标到上方窗格
alias tmover="tmux select-pane -R"
# 15 交换窗格位置(当前窗格上移)
alias tswapu="tmux swap-pane -U"
# 16 交换窗格位置(当前窗格下移)
alias tswapd="tmux swap-pane -D"

配置

# add config file
echo "  " >  ~/.tmux.conf
cat>~/.tmux.conf<<EOF
# Send prefix
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix


# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window

# Mouse mode
set -g mouse on


# Set easier window split keys
bind-key v split-window -h
bind-key h split-window -v

# Easy config reload
bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded"
EOF

tmux source ~/.tmux.conf

代理

export ALL_PROXY="http://192.168.1.3:1083"
export http_proxy="http://192.168.1.3:1083"
export https_proxy="http://192.168.1.3:1083"

unset ALL_PROXY
unset http_proxy
unset https_proxy

git config --global http.proxy 'http://192.168.1.3:1083' 
git config --global https.proxy 'http://192.168.1.3:1083'

0

评论区