Linux安装htop命令

第一种:软件的获取与安装

  1. Unbuntu
    apt-get install -y htop
  2. Debian
    apt-get install htop
  3. Fedora
    yum install htop
  4. CentOS或RedHat
    yum install htop
  5. Mac
    yum install htop
    或者
    zypper se htop
    zypper install htop
  6. opensuse
    yum install htop
  7. Gentoo
    emerge sys-process/htop
  8. GoboLinux
    Compile htop

第二种:源码安装

  • 压缩包安装
    wget https://hisham.hm/htop/releases/2.2.0/htop-2.2.0.tar.gz
    tar -zxvf htop-2.2.0.tar.gz
    cd htop-2.2.0/
    ./configure && make && make install
  • git源码安装
    git clone https://github.com/hishamhm/htop.git
    cd htop/
    ./autogen.sh && ./configure && make && make install

 

注意:htop源码安装方式默认安装到/usr/local目录下,如果想安装到其它路径,在执行configure时通过—prefix指定,格式为:./configure --prefix=/some/path

终端输入htop命令:

htop其它参数,除了上面介绍的一些热键,htop 还提供了一些有用的命令行参数。如:

-s 选项 : 按指定的列排序。如,htop -s PID命令会按PID 列的大小排序来显示。
-u 选项 : 显示指定的用户的进程信息。如,htop -u test命令会只显示出用户名为test的相关进程。
-d 选项 : 设置刷新时间,单位为秒。如,htop -d 10命令会每10秒刷新一次。
-C 选项:设置界面为无颜色

 

作者:Carver-大脸猫

出处:https://www.cnblogs.com/carver/articles/17674218.html

版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。

转载请注明原处

posted @   Carver-大脸猫  阅读(864)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
点击右上角即可分享
微信分享提示
more_horiz
keyboard_arrow_up light_mode palette
选择主题