批量配置

  • 简易的 shell 脚本:https://github.com/qbit-git/m...

    bash modern_cli_ubuntu2004.sh
  • 本脚本适用于与有 root/sudo 权限使用
  • 本脚本适用于初始化,没做条件判断,不适用于复杂情景

工具

rg 替换 grep

  • 编程语言: Rust
  • GitHub:https://github.com/BurntSushi...
  • 安装与配置

    sudo apt install ripgrep -y
    # 下面一句是避免与下文介绍的 bat 冲突
    sudo sed -i '/\/usr\/.crates2.json/d' /var/lib/dpkg/info/ripgrep.list
    echo 'alias grep=rg' >> ~/.bashrc

bat 替换 cat

fd 替换 find

  • 编程语言: Rust
  • GitHub: # https://github.com/sharkdp/fd

    sudo apt install fd-find -y
    echo 'alias fd=fdfind' >> ~/.bashrc 
    echo 'alias find="fdfind -H"' >> ~/.bashrc 

fzf 命令行模糊匹配

  • 编程语言: Go
  • GitHub: https://github.com/junegunn/fzf

    sudo apt install fzf
    echo 'source /usr/share/doc/fzf/examples/completion.bash' >> ~/.bashrc 
    echo 'source /usr/share/doc/fzf/examples/key-bindings.bash' >> ~/.bashrc

pipx

  • 编程语言: Python
  • GitHub: https://github.com/pypa/pipx
  • 安装与配置

    pip3 install pipx
    echo 'export PATH=$PATH:/home/ubuntu/.local/bin' >> ~/.bashrc

tldr

glances 替换 top

pipx install glances
mkdir ~/.config/glances/
cp ~/.local/pipx/venvs/glances/share/doc/glances/glances.conf ~/.config/glances/glances.conf

xonsh 基于 Python 的 shell

pipx install xonsh[full] -i https://mirrors.aliyun.com/pypi/simple/
aliases['ll'] = 'ls -al'
本文出自 qbit snap

qbit
268 声望279 粉丝