Linux System hardware Configuration view method

Source: Internet
Author: User

One: View CPU

More/proc/cpuinfo | grep "model name"

grep "model name"/proc/cpuinfo

If you feel the need to see more comfortable

grep "model Name"/proc/cpuinfo | Cut-f2-d:

Two: View memory

grep memtotal/proc/meminfo

grep Memtotal/proc/meminfo | Cut-f2-d:

Free-m |grep "Mem" | awk ' {print $} '

Three: Check whether the CPU is 32-bit or 64-bit

View the number of CPU bits (+ or 64)

Getconf Long_bit

Four: View the current version of Linux

More/etc/redhat-release

Cat/etc/redhat-release

V: View kernel version

Uname-r

Uname-a

VI: View current time

Date

The above has been described how to synchronize time,

Seven: View hard disks and partitions

Df-h

Fdisk-l

You can also view partitions

Du-sh

You can see all the space occupied

Du/etc-sh

You can see the size of this directory

Eight: View the installed packages

To view the packages installed on the system

Cat-n/root/install.log

More/root/install.log | Wc-l

See which packages are now installed

Rpm-qa

Rpm-qa | Wc-l

Yum List Installed | Wc-l

But strangely enough, the number of installation packages I've queried through RPM, and Yum, is not the same. No reason was found.

Nine: View the keyboard layout

Cat/etc/sysconfig/keyboard

Cat/etc/sysconfig/keyboard | grep KEYTABLE | Cut-f2-d=

Ten: View selinux status

Sestatus

Sestatus | Cut-f2-d:

Cat/etc/sysconfig/selinux

11: View Ip,mac Address

In the Ifcfg-eth0 file you can see Mac, Gateway and other information.

Ifconfig

Cat/etc/sysconfig/network-scripts/ifcfg-eth0 | grep ipaddr

Cat/etc/sysconfig/network-scripts/ifcfg-eth0 | grep ipaddr | Cut-f2-d=

Ifconfig eth0 |grep "inet addr:" |awk ' {print $} ' |cut-c 6-

Ifconfig | grep ' inet addr: ' | Grep-v ' 127.0.0.1 ' | Cut-d:-f2 | awk ' {print '} '

View Gateway

Cat/etc/sysconfig/network

View DNS

Cat/etc/resolv.conf

12: View Default language

Echo $LANG $LANGUAGE

cat/etc/sysconfig/i18n

13: View your time zone and whether to use UTC time

Cat/etc/sysconfig/clock

14: View Host Name

Hostname

Cat/etc/sysconfig/network

Modify the hostname is to modify this file, but also preferably the host file also modified.

View PCI Information LSPCI

View hard disk information DF-LH

Curl--head www.163.com View 163.com Server environment

Uptime See how long the boot time

Ifconfig eth0 up enable NIC Eth0

/etc/initd/network Restart Restart Network Service

XV: View the system hairstyle version

Method 1

For Linux systems, there are hundreds of distributions. For release version number View method

Take CentOS for example. Input lsb_release-a can be

This command applies to all Linux, including Redhat, SuSE, Debian, and other distributions

Method 2

If, for example, this command is not

You can view Cat/etc/xxx-release xx as the release name. such as centos-release

Method 3.

You can also view the release version number by viewing the /etc/issue file

Linux System hardware Configuration view method

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.