终端配置
打造一个顺手的终端环境,比较适合远程ssh连上,远程写代码等。可以放到一个docker镜像里面。这样,非常方便迁移。
必装的软件
ssh
rsync
ranger
安装ranger管理工具
pip3 install -i https://mirrors.aliyun.com/pypi/simple/ ranger-fm
# Fedora 用户可以通过 pkcon install ranger
# sudo apt install ranger
输出ranger 即可使用。
可以使用方向键或者vim的hjkl的键盘来移动。使用
:q退出。shift + :可以使用命令。对于文件,使用向右的箭头或者回车,都可以直接编辑文件。
neovim
https://github.com/neovim/neovim
https://www.bilibili.com/video/BV1YF411i72t/
https://github.com/AGou-ops/dotfiles/tree/master
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
wget https://endpoint.fastgit.org/AGou-ops/dotfiles/releases/download/bilibili-2021-12-29/bilibili.tar.gz
exit
ls
alias vi=vim
cat onekey_install.sh
# 备份
cp sources.list{,.bak}
# 更新源配置
curl -o /etc/apt/sources.list http://mirrors.cloud.tencent.com/repo/ubuntu20_sources.list
ls -alh
apt update
#安装nodejs 实际上版本有点低
apt install nodejs
apt install tmux
nodejs --version
apt install vim
nvim hello.py
# python
apt install python3.8
apt install python3-pip
pip install requests
pip3 install django
# 更新nodejs
curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
sudo apt update
sudo apt install nodejs
# 测试安装 autojump
apt install autojump
source /usr/share/autojump/autojump.sh
git --version
vim
ls
cd .config/nvim/lua/AGou/
# 自动补全
vi lsp.lua
vi nvim-cmp.lua
# python 对应 https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
# pylsp
pip3 install python-lsp-server[all]
cd ..
cd /work/
ls
vi hello.py
ls
vi test.sh
vi ~/.config/nvim/lua/AGou/nvim-cmp.lua
vi ~/.config/nvim/lua/AGou/lsp.lua
ls
whoami
# ranger
pip3 install -i https://mirrors.aliyun.com/pypi/simple/ ranger-fm
ls
ranger
zsh
手工安装方法
克隆好git仓库,然后修改一些配置即可。
apt install -y zsh
git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh
cp ~/.zshrc ~/.zshrc.orig
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
chsh -s $(which zsh)
然后启动的时候,貌似会有类似如下提示:
[oh-my-zsh] Insecure completion-dependent directories detected:
更改用户组、减权限即可。
chmod -R g-w,o-w /root/.oh-my-zsh
chown -R root:root /root/.oh-my-zsh