Get a system, sure to see the system configuration, Linux look at the configuration, can not be as intuitive as windows. You can only view one one. __linux

Source: Internet
Author: User
Tags nameserver

get a system, sure to see the system configuration, Linux look at the configuration, can not be as intuitive as windows. You can only view one one.

One: CPU

[Root@srv/]# More/proc/cpuinfo | grep "model name"

Model Name:intel (R) Xeon (r) CPU X3220 @ 2.40GHz

Model Name:intel (R) Xeon (r) CPU X3220 @ 2.40GHz

Model Name:intel (R) Xeon (r) CPU X3220 @ 2.40GHz

Model Name:intel (R) Xeon (r) CPU X3220 @ 2.40GHz

[Root@srv/]# grep ' model name '/proc/cpuinfo

Model Name:intel (R) Xeon (r) CPU X3220 @ 2.40GHz

Model Name:intel (R) Xeon (r) CPU X3220 @ 2.40GHz

Model Name:intel (R) Xeon (r) CPU X3220 @ 2.40GHz

Model Name:intel (R) Xeon (r) CPU X3220 @ 2.40GHz

[Root@srv/]# grep ' model name '/proc/cpuinfo | Cut-f2-d:

Intel (R) Xeon (r) CPU X3220 @ 2.40GHz

Intel (R) Xeon (r) CPU X3220 @ 2.40GHz

Intel (R) Xeon (r) CPU X3220 @ 2.40GHz

Intel (R) Xeon (r) CPU X3220 @ 2.40GHz

Two: Memory

[Root@srv/]# grep memtotal/proc/meminfo

memtotal:614400 KB

[Root@srv/]# Free-m

Total used free shared buffers Cached

mem:600 23 576 0 0 0

-/+ buffers/cache:23 576

swap:0 0 0

[Root@srv/]# free-m |grep "Mem" | awk ' {print $} '

600

Third: View the number of CPU bits (64)

[Root@srv/]# getconf Long_bit

32

Four: View Linux version

[Root@srv/]# More/etc/redhat-release

CentOS Release 5 (Final)

[Root@srv/]# More/etc/issue

CentOS Release 5 (Final)

KERNEL/R on an/m

[Root@srv/]# More/proc/version

Linux version 2.6.18-92.1.18.el5.028stab060.2pae ([email=root@rhel5-32-build-xemul]root@rhel5-32-build-xemul[/ Email]) (GC

C Version 4.1.2 20071124 (Red Hat 4.1.2-42) #1 SMP Tue 12:31:30 MSK 2009

Five: View kernel version

[Root@srv/]# Uname-r

2.6.18-92.1.18.el5.028stab060.2pae

[Root@srv/]# Uname-a

Linux srv.eddiechen.cn 2.6.18-92.1.18.el5.028stab060.2pae #1 SMP Tue 12:31:30 MSK 2009 i686 i686 i386 Gnu/linux

Six: View the time zone

[Root@srv/]# Date-r

Wed Feb 2009 02:20:50 +0000

[Root@srv/]# Mv/etc/localtime/etc/localtime.save

[Root@srv/]# Cp/usr/share/zoneinfo/asia/shanghai/etc/localtime

[Root@srv/]# Date-r

Wed Feb 2009 10:24:26 +0800

Seven: Host name

View Host Name

[ROOT@SRV/]# hostname

Www.ifuoo.com

Modify Host Name

[Root@srv/]# Cat/etc/sysconfig/network

Eight: View SELinux situation

[Root@srv/]# Sestatus

SELinux status:disabled

Ninth: Network

Ip

[Root@srv/]# Ifconfig | grep ' inet addr: ' | Grep-v ' 127.0.0.1 ' | Cut-d:-f2 | awk ' {print '} '

207.154.202.216

Gateway

[Root@srv/]# Cat/etc/sysconfig/network

networking= "Yes"

Gateway= "192.0.2.1"

Hostname= "srv.eddiechen.cn"

Dns

[Root@srv/]# cat/etc/resolv.conf

NameServer 208.74.168.131

NameServer 208.74.168.132

NameServer 4.2.2.1

Modifying the Host File

[Root@srv/]# cat/etc/hosts

X: Packages already installed

[Root@srv/]# Rpm-qa | Wc-l

197

[Root@srv/]# Yum List installed | Wc-l

198

11: Disks and partitions

[Root@srv/]# Df-h

FileSystem Size Used Avail use% mounted on

/dev/simfs 10G 353M 9.7G 4%/

[Root@srv/]# Du-sh

353M

[Root@srv/]# Du/etc-sh

4.6m/etc

Nine: View the keyboard layout

Cat/etc/sysconfig/keyboard

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

12: View the default language

Echo $LANG $LANGUAGE

cat/etc/sysconfig/i18n

==================================

http://hi.baidu.com/mypc007

The following commands allow you to view the size of the physical memory that the rs/6000 system is equipped with.

LSDEV-CC Memory

View the physical memory device for the rs/6000 configuration, as shown below for the sample output:

Mem0 Available 00-00 Memory

L2cache0 Available 00-00 L2 Cache

Use the command again

Lsattr-el MEM0

Output is as follows

Size total amount of physical memory in Mbytes False

Goodsize Amount of usable physical memory in Mbytes False

This example shows that the physical memory of the machine is 512MB. If you have a device name mem1 in the previous Lsdev output, use the same command to view its corresponding size and so forth. L2CACHE0 is the device name for the system Level 2 cache. Also, use the command:

Lsattr-el L2CACHE0

You can view its size.

View the number of Linux system bits

1. Programming Implementation:

Returns a value of sizeof (int) in a program that returns the number of bytes in the operating system. If the return 4 is a 32-bit operating system, the return of 8 is 64 digits.

2.getconf command:

The getconf command can obtain basic configuration information about the system, such as operating system digits, memory size, disk size, and so on.

For example:

Determine the disk hdisk0 size, or, if root, enter:

Getconf Disk_size/dev/hdisk0

Determine the actual memory size: getconf real_memory

Determine if the machine hardware is 32-bit or 64-bit: getconf Hardware_bitmode

Determine if the kernel is 32-bit or 64-bit: getconf Kernel_bitmode

If the above getconf Kernel_bitmode method is unsuccessful (not successful on my machine), it may be because of an inconsistent version and you can try again: getconf Word_bit, which returns the length of type int, in line with the sizeof (int).

Related Article

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.