linux查看硬體和系統資訊的相關命令簡介

來源:互聯網
上載者:User

標籤:linux命令簡介

linux查看硬體和系統資訊的相關命令簡介 <轉>


[[email protected] ~] # uname -a               # 查看核心/作業系統/CPU資訊的linux系統資訊命令
[[email protected] ~] # head -n 1 /etc/issue   # 查看作業系統版本,是數字1不是字母L
[[email protected] ~] # cat /proc/cpuinfo      # 查看CPU資訊的linux系統資訊命令
[[email protected] ~] # hostname               # 查看電腦名稱的linux系統資訊命令
[[email protected] ~] # lspci -tv              # 列出所有PCI裝置
[[email protected] ~] # lsusb -tv              # 列出所有USB裝置的linux系統資訊命令
[[email protected] ~] # lsmod                  # 列出載入的核心模組
[[email protected] ~] # env                    # 查看環境變數資源
[[email protected] ~] # free -m                # 查看記憶體使用量量和交換區使用量
[[email protected] ~] # df -h                  # 查看各分區使用方式
[[email protected] ~] # du -sh                    # 查看指定目錄的大小
[[email protected] ~] # grep MemTotal /proc/meminfo   # 查看記憶體總量
[[email protected] ~] # grep MemFree /proc/meminfo    # 查看空閑記憶體量
[[email protected] ~] # uptime                 # 查看系統已耗用時間、使用者數、負載
[[email protected] ~] # cat /proc/loadavg      # 查看系統負載磁碟和分區
[[email protected] ~] # mount | column -t      # 查看掛接的分區狀態
[[email protected] ~] # fdisk -l               # 查看所有分區
[[email protected] ~] # swapon -s              # 查看所有交換分區
[[email protected] ~] # hdparm -i /dev/hda     # 查看磁碟參數(僅適用於IDE裝置)
[[email protected] ~] # dmesg | grep IDE       # 查看啟動時IDE裝置檢測狀況網路
[[email protected] ~] # ifconfig               # 查看所有網路介面的屬性
[[email protected] ~] # iptables -L            # 查看防火牆設定
[[email protected] ~] # route -n               # 查看路由表
[[email protected] ~] # netstat -lntp          # 查看所有監聽連接埠
[[email protected] ~] # netstat -antp          # 查看所有已經建立的串連
[[email protected] ~] # netstat -s             # 查看網路統計資訊進程
[[email protected] ~] # ps -ef                 # 查看所有進程
[[email protected] ~] # top                    # 即時顯示進程狀態使用者
[[email protected] ~] # w                      # 查看活動使用者
[[email protected] ~] # id                     # 查看指定使用者資訊
[[email protected] ~] # last                   # 查看使用者登入日誌
[[email protected] ~] # cut -d: -f1 /etc/passwd  # 查看系統所有使用者
[[email protected] ~] # cut -d: -f1 /etc/group   # 查看系統所有組
[[email protected] ~] # crontab -l               # 查看目前使用者的計劃任務服務
[[email protected] ~] # chkconfig –list            # 列出所有系統服務
[[email protected] ~] # chkconfig –list | grep on    # 列出所有啟動的系統服務程式
[[email protected] ~] # rpm -qa                      # 查看所有安裝的軟體包
[[email protected] ~] # cat /proc/cpuinfo      # 查看CPU相關參數的linux系統命令
[[email protected] ~] # cat /proc/partitions   # 查看linux硬碟和分區資訊的系統資訊命令
[[email protected] ~] # cat /proc/meminfo      # 查看linux系統記憶體資訊的linux系統命令
[[email protected] ~] # cat /proc/version      # 查看版本,類似uname -r
[[email protected] ~] # cat /proc/ioports      # 查看裝置io連接埠
[[email protected] ~] # cat /proc/interrupts   # 查看中斷
[[email protected] ~] # cat /proc/pci      # 查看pci裝置的資訊
[[email protected] ~] # cat /proc/swaps      # 查看所有swap分區的資訊

以上命令如果說沒有,那麼在RHEL6的系統上,你可以用 yum provides “*/lspci”這樣類似的命令來查詢,然後安裝相應的軟體包就可以了。


本文出自 “每天一小步” 部落格,請務必保留此出處http://gaibianziji.blog.51cto.com/1082897/1426659

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.