歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> Unix資訊 >> 闡述linux中solaris命令

闡述linux中solaris命令

日期:2017/3/6 11:43:09   编辑:Unix資訊

隨著我們學習linux的深入,linux中的一些命令語句也逐漸被我們所熟知。今天我們就講一講linux中solaris命令有哪些,而他們又是怎樣進行運行的。這些solaris命令也許有的你很熟悉,有的你還不太了解,希望我的介紹對你有所幫助。

一、查看系統版本

【Linux】
幾種查看linux版本信息的方法:
1. uname -a
2. cat /proc/version
3. cat /etc/issue
4. lsb_release -a

# lsb_release -a
LSB Version: 1.3
Distributor ID: RedHatEnterpriseAS
Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 1)
Release: 4
Codename: NahantUpdate1
這個命令適用於所有的linux,包括Redhat、SuSE、Debian等發行版。

【Solaris】
cat /etc/release #Solaris版本
uname -a #Kernel版本
showrev
# showrev
Hostname: sun-nj
Hostid: 8316ce50
Release: 5.8
Kernel architecture: sun4u
Application architecture: sparc
Hardware provider: Sun_Microsystems
Domain:
Kernel version: SunOS 5.8 Generic 108528-18 November 2002

二、硬件信息

【Linux】
CPU:
cat /proc/cpuinfo
內存:
cat /proc/meminfo
free
硬盤:
df -h -T(no device的設備看不到)
fdisk -l可以在redhat9.0中看; redhat企業版不行.
IRQ使用情況
cat /proc/interrupts
除了看/proc下的數據外,可以用一些命令來查看硬件信息,如:
dmesg
lshw
lspci -v
hwinfo
dmidecode
hal-device-manager

【Solaris】
網卡速度: dmesg |grep link
CPU頻率: psrinfo -v 或者mpstat
cpu\內存等:prtdiag -v (大部分信息全部列出) 需要先進入/usr/platform/sun4u/sbin
硬盤: iostat -E

三、速率、流量

【Linux】
查看流量:
iptraf

四、軟件版本

【Solaris】
如果軟件是以軟件包形式安裝進去的,可以通過檢索安裝數據庫獲得。
以sendmail為例

1. grep sendmail /var/sadm/install/contents
檢索出與sendmail有關系的package有SUNWsndmr。

2. pkginfo -l SUNWsndmr
可以得到該軟件包的版本。

3. pkgchk -v SUNWsndmr
可以察看SUNWsndmr包括的所有文件。

全文已經看完,你是否了解了linux中solaris命令,記住了這些命令會對你有所幫助。對你學習linux會更加輕松。

Copyright © Linux教程網 All Rights Reserved