it prevents the user making any system-destroying mistakes
it stores all the commands run with sudo to a file where can be reviewed later if needed
增加用户
1
sudo adduser work
增加sudo权限
1 2 3 4 5
sudo /usr/sbin/visudo
# User privilege specification rootALL=(ALL:ALL) ALL workALL=(ALL:ALL) ALL
删除用户
1 2
sudo userdel newuser sudorm -rf /home/newuser
安装tmux 1.8
ubuntu Lucid源中的tmux版本过老,为此,我们手动安装tmux 1.8,
安装基础编译环境
1
sudo apt-get install build-essential
安装依赖包
1 2 3 4 5
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz tar xzf libevent-2.0.21-stable.tar.gz cd libevent-2.0.21-stable configure && make && sudo make install sudo apt-get install ncurses-dev
安装tmux 1.8
1 2 3 4 5 6
wget http://downloads.sourceforge.net/tmux/tmux-1.8.tar.gz tar xzf tmux-1.8.tar.gz cd tmux-1.8 ./configure LDFLAGS="-Wl,-rpath /usr/local/lib" make sudo make install
# THEME set -g status-bg black set -g status-fg white set -g window-status-current-bg white set -g window-status-current-fg black set -g window-status-current-attr bold set -g status-interval 60 set -g status-left-length 30 set -g status-left '#[fg=green](#S) #(whoami)' set -g status-right "#[fg=green]#(date)#[default] #[fg=green]#(cut -d ' ' -f 1-3 /proc/loadavg)#[default]"
setw -g mode-keys vi setw -g mode-mouse off set -g terminal-overrides 'xterm*:smcup@:rmcup@' set -g base-index 1 #set -s escape-time 0 setw -g aggressive-resize on
unbind r bind r source-file ~/.tmux.conf
set -g history-limit 25000
#T-Mobile G2 workarounds bind Q send-keys F1 bind W send-keys F2 bind E send-keys F3 bind R send-keys F4 bind T send-keys F5 bind Y send-keys F6 bind U send-keys F7 bind I send-keys F8 bind O send-keys F9 bind P send-keys F10 bind A send-keys F11 bind S send-keys F12