📅  最后修改于: 2022-03-11 14:49:59.580000             🧑  作者: Mango
# Check htop installation:
brew reinstall htop
# Allow it to run without passwd:
sudo visudo
# -> Add this:
"%admin ALL=(ALL) NOPASSWD: /usr/local/bin/htop"
# Save (:wq, :x)
# Create an alias for htop:
# Open your rc file (~/.bashrc, ~/.profile, ~/.zshrc)
vi ~/.bashrc
# -> Add this:
"alias htop='sudo htop'"