Linux查詢系統資訊
摘要:
Linux命令(檢視系統資訊)
@Date 2017.07.10
查詢命令
# head -n 1 /etc/issue# 檢視作業系統版本
# hostname# 檢視計算機名
# env...
Linux命令(檢視系統資訊)
@Date 2017.07.10
查詢命令
# head -n 1 /etc/issue# 檢視作業系統版本 # hostname# 檢視計算機名 # env# 檢視環境變數 # lsmod# 列出載入的核心模組 # getconf LONG_BIT# 查詢系統64位還是32位 # uname -r# 查詢系統核心版本 # uname -a# 查詢系統所有版本資訊
查詢CPU詳情
# 檢視CPU所有信息 cat /proc/cpuinfo # 查詢CPU物理個數(本機器有幾個CPU單元) cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l # 查詢邏輯CPU個數(物理CPU個數 * 單個CPU核數) cat /proc/cpuinfo |grep "processor"|wc -l # 查詢單個CPU核數 cat /proc/cpuinfo |grep "cores"|uniq # 查詢HT(超執行緒)相關 cat /proc/cpuinfo |grep "sibling"|uniq cat /proc/cpuinfo | grep "cpu cores"|uniq # 查詢CPU32位還是64位 getconf LONG_BIT