Enjoy it!
此步骤仅适用于ubuntu18和ubuntu20,低于ubuntu18的版本对应的source.list自行查找。centos无需更新此文件
首先查看系统版本或系统代号:
cat /etc/os-release
lsb_release -a
如果是ubuntu18.04,则发行代号为bionic,如果是ubuntu20.04,发行代号为focal
更新source.list最好将之前的备份一下:sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
在sourcelist目录找到合适的source.list,复制内容覆盖到 /etc/apt/source.list,然后执行 sudo apt update
这里只列出来,具体可以自己找教程安装,不过基本都可以直接 apt install 一键安装
cp ./vim/vimrc ~/.vimrc
mkdir ~/.vim
cp -r ./vim/autoload ~/.vim/
先安装 ctags-exuberant,因为TagList插件需要这个才能工作,安装方法如下:
先安装编译工具:
sudo apt install gcc
sudo apt install make
再安装ctags:
tar zxf ctags-5.8.tar.gz
cd ctags-5.8
./configure
make
sudo make install
最后,打开vim,安装所有插件
:PlugInstall
等待安装完成即可
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.last 'log -1 --stat HEAD'
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset'"
git config --global alias.count "shortlog --summary --numbered"
git config --global core.editor vim
# 禁止git branch命令触发less分页
git config --global pager.branch false
sudo apt install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
会自动将zsh作为默认的shell,并生成一个默认的.zshrc配置文件
接下来使用本仓库的zshrc文件覆盖默认的zshrc
rm ~/.zshrc
cp zshrc ~/.zshrc
先不要急着source,会报错,source报错了也先别急
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
推荐使用git下载并安装,不要使用linux自带的apt工具,版本太老
# 可以修改fzf的目录,同时也要修改zshrc中的配置
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
# 前两个都输入y,最后问是否修改zshrc,选择n
~/.fzf/install
一个vim风格的文件夹浏览工具
https://github.com/ranger/ranger
按照README中的步骤来安装即可,可能需要python环境
根据需要进行修改即可,可以修改的位置直接搜索(opt)
即可,包括:
最后别忘了将配置生效,不要使用source ~/.zshrc
,这是错误的做法,正确的做法是:
omz reload
Glow是一款非常好用的命令行markdown阅读器
sudo apt install gpg
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update
sudo apt install glow
命令行复用和会话粘滞工具
sudo apt install tmux
使用参考Tmux教程
(可选)安装tmuxinator
开启zshrc插件:tmux、tmuxinator(可选)
使用国内镜像来安装,更快:
/bin/zsh -c "$(curl -fsSL https://gitee.com/huwei1024/HomebrewCN/raw/master/Homebrew.sh)"
tmux管理工具
https://github.com/ivaaaan/smug
cd /tmp
git clone https://github.com/ivaaaan/smug.git
cd smug
go install
更强大的watch命令
https://github.com/sachaos/viddy
go install github.com/sachaos/viddy@latest
更强大的top命令
https://github.com/xxxserxxx/gotop
go install github.com/xxxserxxx/gotop/v4/cmd/gotop@latest
docker可视化管控
https://github.com/skanehira/docui.git
docker可视化管控
https://github.com/jesseduffield/lazydocker
强大的k8s可视化管控工具
https://github.com/derailed/k9s
调试工具,嗅探数据库请求、解析、打印
https://github.com/40t/go-sniffer
更好的df工具,足以替代df
命令行个人看板工具
https://github.com/wtfutil/wtf
交互式或流式的JSON查看工具
https://github.com/antonmedv/fx
Linux服务器运维管理面板
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。