How to view Linux versions and other commands

Source: Internet
Author: User

1. Run the following command to view the kernel version:

 

 1) [root @ q1test01 ~] # Cat/proc/version

Linux version 2.6.9-22. elsmp (bhcompile@crowe.devel.redhat.com)
(GCC version 3.4.4 20050721 (Red Hat 3.4.4-2) #1 SMP mon Sep 19
18:00:54 EDT 2005

 

2) [root @ q1test01 ~] # Uname-

 

Linux q1test01 2.6.9-22. elsmp #1 SMP mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux

 

 3) [root @ q1test01 ~] # Uname-R

2.6.9-22. elsmp

 

2. There are three main methods to view the Linux version:

 

1) log on to the server and execute lsb_release-a to list all version information, for example:

 

[Root@3.5.5Biz-46 ~] # Lsb_release-

Lsbversion: 1.3

Distributor ID: redhatenterpriseas

Description: Red Hat Enterprise Linux as Release 4 (nahant update 1)

Release: 4

Codename: nahantupdate1

 

[Root@3.5.5Biz-46 ~] #

This command applies to all Linux releases, including RedHat, Suse, and Debian.

 

2) log on to Linux and run CAT/etc/RedHat-release, for example
:

 

[Root@3.5.5Biz-46 ~] # Cat/etc/RedHat-release


Red Hat Enterprise Linux as Release 4 (nahant update 1)

[Root@3.5.5Biz-46 ~] #

In this way, you can see the specific version number, such as as4 update 1.

 

3) log on to Linux and execute rpm-Q RedHat-release, for example

[Root@3.5.5Biz-46 ~] # Rpm-Q RedHat-release

Redhat-release-4AS-2.4

[Root@3.5.5Biz-46 ~] #

In this way, we can see a so-called release number. For example, the above example is 2.4.

There is a certain correspondence between the release number and the actual version, as shown below:

Redhat-release-3AS-1-> Redhat Enterprise Linux as 3

Redhat-release-3AS-7.4-> Redhat Enterprise Linux as 3 Update 4

Redhat-release-4AS-2-> Redhat Enterprise Linux as 4

Redhat-release-4AS-2.4-> Redhat Enterprise Linux as 4 Update 1

Redhat-release-4AS-3-> Redhat Enterprise Linux as 4 Update 2

Redhat-release-4AS-4.1-> Redhat Enterprise Linux as 4 Update 3

Redhat-release-4AS-5.5-> Redhat Enterprise Linux as 4 Update 4

 

Note: method (2) (3) is only valid for Redhat Linux.

 

Source Address http://bbs.eb2000.cn/redirect.php? Tid = 1928 & goto = lastpost

-------------------

From http://blog.csdn.net/zhangren07/archive/2010/07/10/5725002.aspx

 

View the Linux version: lsb_release-


 

View CPU information (model)

# Cat/proc/cpuinfo | grep name | cut-F2-D: | uniq-C

8 Intel (r) Xeon (r) CPU e5410 @ 2.33 GHz

(We can see eight logical CPUs and the CPU model)

 

# Cat/proc/cpuinfo | grep physical | uniq-C

4 physical ID: 0

4 physical ID: 1

(It means two 4-core CPUs)

 

# Getconf long_bit

32

(This indicates that the current CPU runs in 32bit mode, but does not indicate that the CPU does not support 64bit)


# Cat/proc/cpuinfo | grep flags | grep 'lm '| WC-l

8

(If the result is greater than 0, 64bit computing is supported. lm indicates long mode, and Lm indicates 64bit)

 

Let's take a full look at the CPU details, but we don't care about most of them.

# Dmidecode | grep 'processor information'


View memory information

# Cat/proc/meminfo

Free-MT

 

# Uname-

Linux euis1 2.6.9-55. elsmp #1 SMP Fri APR 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux

 

(View the kernel information of the current operating system)

# Lsb_release-

Red Hat Enterprise Linux as Release 4 (nahant Update 5)

 

(View the released version of the current operating system)

View the Machine Model

# Dmidecode | grep "product name"


View Nic Information

# Dmesg | grep-I ETH

(1) ifconfig check which network card (ethx) the server is connected)

(2) ethtool ethx checks the network card details (ethx is the network card number detected by ifconfig, for example, eth0)

 

View Apache, JDK, and JBoss versions

./Apachectl-version

 

JThe DK version is similar. If there are multiple DK versions under/usr/Alibaba, You can see which one is used in antx. properties.


The JBoss version has a line when starting JBoss. It cannot be started, and then it will be stopped!

 

View JVM Key Parameters

JPS-V

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.