2020-09-04 06:26
deleted home directory
Beware $rm -r * and root permissions in general
deleted important files by overwrite
Beware $echo “something” > file.txt! can recover with: $alias - dumps all alias definitions to stdout $declare -f - dumps all function definitions to stdout $export -p - dumps all env vars to stdout
not making backups
See #1 and #2
increase the font size
$ sudo echo setfont Uni3-Terminus32x16.psf.gz >> ~/.bash_profile
make using the terminal more tolerable
$ echo "set -o vi" >> ~/.bash_profile
$ sudo apt install vim
$ export EDITOR="vim"
change the keyboard configuration
$ cat /usr/share/X11/xkb/rules/xorg.lst | less
$ man keyboard
```
XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS="caps:escape"
BACKSPACE="guess"
```
$ sudo setupcon
record commands from a session
$ echo history | tail -n 50 >> learning\ notes.md
install ncurses
$ sudo apt-get install libncurses5-dev libncursesw5-dev
install tmux
$ sudo apt-get install tmux -y
configure tmux
```
# change the default prefix key
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# configure status line
set-option -g status-style bg=blue
# vim-like panel switching
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
bind $ swap-pane -D
bind < swap-pane -U
# vim-like window switching
unbind n
unbind p
bind -r C-h previous-window
bind -r C-l next-window
# vim-like resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# logical splitting
bind | split-window -h
bind - split-window -v
```
sudo echo setfont Uni3-Terminus32x16.psf.gz >> ~/.bash_profile
cat /usr/share/X11/xkb/rules/xorg.lst | less man keyboard
```
XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS="caps:escape"
BACKSPACE="guess"
```
sudo setupcon
echo history | tail -n 50 >> learning notes.md
sudo apt-get install libncurses5-dev libncursesw5-dev
sudo apt-get install tmux -y
```
# change the default prefix key
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# configure status line
set-option -g status-style bg=blue
# vim-like panel switching
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
bind > swap-pane -D
bind < swap-pane -U
# vim-like window switching
unbind n
unbind p
bind -r C-h previous-window
bind -r C-l next-window
# vim-like resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# logical splitting
bind | split-window -h
bind - split-window -v
```
set -o vi :5, 10sort