Linux System Information View commands Learn notes

Source: Internet
Author: User
Tags locale

thanks to my mentor's strong support, I applied for a United States server, let me use to do the experiment to deploy something, suddenly interest, want to take a good look at this server system information, and review the command to view system information. (The main reference of the content "How Linux Views System Information" )

Thank you very much for teacher Liu's strong support and do not abandon!!!

Then start the System Information review tour.



1, the CPU Information view:


[Email protected]:~# more/proc/cpuinfo |grep "model name"

Model Name:qemu Virtual CPU version 1.1.2


[Email protected]:~# grep "model name"/proc/cpuinfo

Model Name:qemu Virtual CPU version 1.1.2


[Email protected]:~# grep "model name"/proc/cpuinfo |cut-f2-d:

QEMU Virtual CPU Version 1.1.2


2. View Memory:


[Email protected]:~# vi/proc/meminfo

memtotal:2050116 KB

memfree:1663960 KB

buffers:23220 KB

cached:270244 KB

swapcached:0 KB

active:114640 KB

inactive:224364 KB

Active (anon): 45676 KB

Inactive (anon): 276 KB

Active (file): 68964 KB

Inactive (file): 224088 KB

unevictable:0 KB

mlocked:0 KB

swaptotal:2096444 KB

swapfree:2096444 KB

Dirty:24 KB

writeback:0 KB

anonpages:45560 KB

mapped:10432 KB

shmem:392 KB

slab:22268 KB

sreclaimable:13064 KB

sunreclaim:9204 KB

kernelstack:592 KB

pagetables:7000 KB

nfs_unstable:0 KB

bounce:0 KB

writebacktmp:0 KB

commitlimit:3121500 KB

committed_as:10310868 KB

vmalloctotal:34359738367 KB

vmallocused:7896 KB

vmallocchunk:34359724836 KB

hardwarecorrupted:0 KB

anonhugepages:10240 KB

hugepages_total:0

hugepages_free:0

hugepages_rsvd:0

hugepages_surp:0

hugepagesize:2048 KB

directmap4k:34808 KB

directmap2m:2062336 KB

(All memory information above)


[Email protected]:~# grep memtotal/proc/meminfo

memtotal:2050116 KB


[Email protected]:~# free-m

Total used free shared buffers Cached

mem:2002 375 1626 0 22 264

-/+ buffers/cache:88 1913

swap:2047 0 2047


[Email protected]:~# free-m|grep ' Mem ' |awk ' {print $} '

2002


3. View the number of Linux CPU bits:


[Email protected]:~# getconf long_bit

64


4. View the Linux version:


All version information:

[Email protected]:~# more/etc/os-release

Name= "Ubuntu"

Version= "14.04, trusty Tahr"

Id=ubuntu

Id_like=debian

Pretty_name= "Ubuntu 14.04 LTS"

Version_id= "14.04"

Home_url= "http://www.ubuntu.com/"

Support_url= "http://help.ubuntu.com/"

Bug_report_url= "http://bugs.launchpad.net/ubuntu/"


[Email protected]:~# more/etc/issue

Ubuntu 14.04 LTS \ \l


[Email protected]:~# more/proc/version

Linux version 3.13.0-27-generic ([email protected]) (GCC version 4.8.2 (Ubuntu 4.8

.2-19ubuntu1)) #50-ubuntu SMP Thu May 18:06:16 UTC 2014


5. View Kernel version


[Email protected]:~# uname-r

3.13.0-27-generic


[Email protected]:~# uname-a

Linux nems 3.13.0-27-generic #50-ubuntu SMP Thu may 18:06:16 UTC x86_64 x86_64 x86_64 gnu/linux


6. View time zone and modify time zone:


[Email protected]:~# date-r

Mon, OCT 2015 21:55:03 +0800


[Email protected]:~# mv/etc/localtime/etc/local

Locale.alias localtime

[Email protected]:~# mv/etc/localtime/etc/local

Locale.alias localtime

[Email protected]:~# mv/etc/localtime/etc/localtime.save

[Email protected]:~# cp/usr/share/zoneinfo/asia/shanghai/etc/localtime

[Email protected]:~# date-r

Mon, OCT 2015 21:56:52 +0800


7, Host name:


View Host Name:

[Email protected]:~# hostname

Nems

Modify Host Name:

[Email protected]:/etc# vi hostname

Nems

Restart takes effect

Modified to NEMS (never ending Mining sentences)


8. View SELinux Status:

[Email protected]/]# Sestatus

SELinux status:disabled


9. Network:

Ip:

[Email protected]:~# ifconfig|grep ' inet addr: ' |grep-v ' 127.0.0.1 ' |cut-d:-f2|awk ' {print '} '

10.128.131.235

211.155.92.229


10. View the installed packages:


[Email protected]:~# rpm-qa|wc-l

0


11. Disk and partition conditions:

[Email protected]:~# df-h

Filesystem Size used Avail use% mounted on

/DEV/VDA1 25G 1.4G 22G 6%/

None 4.0K 0 4.0K 0%/sys/fs/cgroup

Udev 991M 4.0K 991M 1%/dev

Tmpfs 201M 388K 200M 1%/run

None 5.0M 0 5.0M 0%/run/lock

None 1002M 0 1002M 0%/run/shm

None 100M 0 100M 0%/run/user

/DEV/VDC1 99G 60M 94G 1%/data


[Email protected]:~# du-sh

444K

[Email protected]:~# du/dev/vdc1-sh

0/dev/vdc1

[Email protected]:~# du/dev/vda1-sh

0/dev/vda1

[Email protected]:~# du/etc/-sh

5.1m/etc/


12. View the default language:

[Email protected]:~# echo $LANG $LANGUAGE

en_US. UTF-8 En_us:en


The experiment needs to modify the default language:

[Email protected]:~# sudo vi/etc/default/locale #打开之后, enter the following code

Lang= "ZH_CN"

Language= "Zh_cn:zh"

Lc_messages= "ZH_CN. UTF-8 "

Lc_ctype= "ZH_CN. UTF-8 "

Lc_collate= "ZH_CN. UTF-8 "

Restart Effective: Shutdown-r now

[Email protected]:~# echo $LANG $LANGUAGE

ZH_CN Zh_cn:zh



Linux System Information View commands Learn notes

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.