📜  mac os htop 不返回 cpu - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:59.580000             🧑  作者: Mango

代码示例1
# 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'"