怎么网站是谁做的,做网站为什么要买服务器,友情链接交换的作用在于,百度推广平台登录网址切换shell
在Linux中默认使用/bin/bash#xff0c;在用户创建时#xff0c;会自动给用户创建用户默认的shell。默认的shell就是/bin/bash。要修改shell将其设置为/bin/ksh#xff0c;有两种方法方法
# 方法一: chsh -s /bin/ksh
chsh -s /bin/zsh # 方法二: usermod -s /b…
切换shell
在Linux中默认使用/bin/bash在用户创建时会自动给用户创建用户默认的shell。默认的shell就是/bin/bash。要修改shell将其设置为/bin/ksh有两种方法方法
# 方法一: chsh -s /bin/ksh
chsh -s /bin/zsh # 方法二: usermod -s /bin/ksh rootusermod -s /bin/zsh root# 查看当前使用的shell
echo $SHELL# 查看所有可用的shell
cat /etc/shells安装zsh
yum install zsh安装 Oh My Zsh
下载安装脚本 https://github.com/ohmyzsh/ohmyzsh/blob/master/tools/install.sh如果开发机没有外网权限则修改 install.sh 中 REMOTEKaTeX parse error: Expected }, got EOF at end of input: ….baidu-int.com/{REPO}.git} 为我厂的 github mirror一键安装
sh install.sh --skip-chsh安装 powerlevel10k
powerlevel10k 是一款非常优秀的 zsh 主题可直接克隆仓库
git clone --depth1 https://github.baidu-int.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k在 ~/.zshrc 中修改主题 ZSH_THEME“powerlevel10k/powerlevel10k” 后可通过 p10k configure 命令采用问答快速定制化自己的配置配置完成后还可以在 ~/.p10k.zsh 中自己设置包括左右栏显示的信息等。如果配置完成后显示有乱码或者符号显示不完全是因为没有设置对应的字体在 nerd-fonts 下载 Hack Nerd Font 或 Meslo Nerd Font 字体并在 iTerm2 正确设置后即可正常显示。
常用插件
Oh My Zsh 提供了非常丰富的插件可根据自己的喜好来安装但也不宜过多常用的插件有 git, z, zsh-syntax-highlighting, zsh-autosuggestions需要在 ~/.zshrc 中修改 plugins 为 plugins(git z zsh-syntax-highlighting zsh-autosuggestions)
VSCode 终端字体修改
在 settings 中搜索 terminal font修改为之前设置的 iTerm2 相同的字体即可。
效果图 tmux 配置 安装及配置
使用 jumbo 安装 tmux 新版
jumbo install tmux2使用以下配置覆盖 ~/.tmux.conf.tmux.conf
# ------ general ------------------------------------
set -g prefix C-s
unbind C-b
bind C-s send-prefixset -g escape-time 0
set -g base-index 1
set -g renumber-windows on
set -g mouse on
set -wg pane-base-index 1# rename-window
set -wg allow-rename off
set -wg automatic-rename offset -wg mode-keys vi# last-window
bind a last# retain current path
bind c new-window -c #{pane_current_path}
bind _ split-window -h -c #{pane_current_path}
bind - split-window -c #{pane_current_path}# restart and edit
bind r source ~/.tmux.conf\; display tmux config sourced
bind e neww -n tmux-config \${EDITOR:-vim} ~/.tmux.conf# ------ move around --------------------------------
bind -r h select-pane -L
bind l select-pane -R # remove repeat, because of ls
bind -r j select-pane -D
bind -r k select-pane -U# ------ status theme -------------------------------
set -g message-style bg#00346e, fg#ffffd7 # tomorrow night blue, base3set -g status-style bg#00346e, fg#ffffd7 # tomorrow night blue, base3
set -g status-left #[bg#0087ff] ❐ #S # blue
set -g status-left-length 400
set -g status-right #{?client_prefix, ⌨ , } #[bg#0087ff] #(whoami)#h #[bgred] %Y-%m-%d %H:%M
set -g status-right-length 600set -g set-clipboard on
set -g history-limit 10000set -wg window-status-format #I #W
set -wg window-status-current-format #I #W
set -wg window-status-separator
set -wg window-status-current-style bgred # red
set -wg window-status-last-style fgredset -wg pane-active-border-style fgblue
set -wg pane-border-style fg#585858 # base01set -g default-terminal screen-256color# ------- copy to clipboard ------------------------
# bind -t vi-copy y copy-pipe xclip -selection clipboard /dev/null
# bind -t vi-copy y copy-pipe reattach-to-user-namespace pbcopy将快捷键更新为 C-s设置鼠标开启配置我厂的蓝红配色等。 vim 配置 安装插件
安装 vim-plug 管理插件
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim使用如下代码覆盖 ~/.vimrc 来安装 vim-airlinevim-airline-themesvim-onenerdtree 插件使用 :PlugInstall 来安装以及一些简单的 vim 配置.vimrc
call plug#begin(~/.vim/plugged)Plug https://github.baidu-int.com/vim-airline/vim-airline
Plug https://github.baidu-int.com/vim-airline/vim-airline-themes
Plug https://github.baidu-int.com/preservim/nerdtreecall plug#end()set number
set cursorline
set cursorcolumn
set noshowmode airline
let g:airline_themedracula
let g:one_allow_italics1
let g:airline_powerline_fonts1
let g:airline#extensions#tabline#enabled1
let g:airline#extensions#tabline#left_sep
let g:airline#extensions#tabline#left_alt_sep|
let g:airline#extensions#tabline#buffer_nr_show1 NERDTree
map C-n :NERDTreeToggleCR