View common commands for Linux systems, Linux View system configuration common commands

Source: Internet
Author: User
Tags dmesg

One, the Linux CPU size
Cat/proc/cpuinfo |grep "model name" && cat/proc/cpuinfo |grep "Physical ID"


Description: Detailed information about each CPU can be seen in/proc/cpuinfo under Linux. But for a dual-core CPU, you will see two CPUs in the Cpuinfo. It is often mistaken for a two single-core CPU.
You should actually differentiate between single-core and dual-core by physical Processor ID. The physical Processor ID can be found from Cpuinfo or DMESG. Flags if you have HT description support Hyper-Threading technology determine the number of physical CPUs you can view the value of the physical ID, the same as
Second, memory size

Cat/proc/meminfo |grep Memtotal

Three, hard disk size
Fdisk-l |grep Disk

Four
UNAME-A # Linux System Information command to view kernel/Os/cpu information


Five, head-n 1/etc/issue # View OS version, is the number 1 not the letter L

Vi. Cat/proc/cpuinfo # Linux System Information commands for viewing CPU information

Vii. hostname # View Linux System Information commands for computer names

Viii. Lspci-tv # List of all PCI devices

Ix. LSUSB-TV # Lists Linux System Information commands for all USB devices

X. LSMOD # List of loaded kernel modules

Module Size used BYAUTOFS4 26513 3SUNRPC 260521 18021q 253170 Garp 7152 18021QSTP 2218 1GARPLLC 5546 2Garp,stpcpufreq_ondemand 10544 2POWERNOW_K8 18171 1Freq_table 4936 2Cpufreq_ondemand,powernow_k8mperf 1557 1Powernow_k8ip6t_reject 4628 2Nf_conntrack_ipv6 8748 2Nf_defrag_ipv6 11182 1Nf_conntrack_ipv6xt_state 1492 2Nf_conntrack 79357 2Nf_conntrack_ipv6,xt_stateip6table_filter 2889 1Ip6_tables 19458 1Ip6table_filteripv6 321422 47Ip6t_reject,nf_conntrack_ipv6,nf_defrag_ipv6ppdev 85370 parport_pc 226900 Parport 36209 2ppdev,parport_pcasus_atk0110 142160 SG 293500 microcode 1126530 Serio_raw 45940 K10temp 36090 Edac_core 465810 EDAC_MCE_AMD 147050 Snd_hda_codec_realtek 68136 1Snd_hda_intel 27823 2Snd_hda_codec 121518 2SND_HDA_CODEC_REALTEK,SND_HDA_INTELSND_HWDEP 6652 1Snd_hda_codecsnd_seq 55759 1Snd_seq_device 6500 1SND_SEQSND_PCM 86635 2Snd_hda_intel,snd_hda_codecsnd_timer 22411 3SND_SEQ,SND_PCMSND 69907 14Snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_seq,snd_seq_device,snd_pcm,snd_timersoundcore 7958 1Sndsnd_page_alloc 8470 2Snd_hda_intel,snd_pcmi2c_piix4 126080 r8169 600230 Mii 5376 1R8169SHPCHP 327780 EXT4 363408 3Mbcache 8193 1EXT4JBD2 90230 1Ext4sr_mod 151770 CDROM 39085 1Sr_modsd_mod 38976 3crc_t10dif 1541 1 sd_modahci 41127 2 pata_acpi 3701 0 ata_generic 3837 0 pata_atiixp 4211 0 radeo N 917108 0 Ttm 80957 1 radeondrm_kms_helper 40087 1 radeondrm 265638 3 radeon,ttm,drm_kms_helperi2c_algo_b It 5935 1 radeoni2c_core 31084 5 i2c_piix4,radeon,drm_kms_helper,drm,i2c_algo_bitdm_mirror 14133 0 dm_ Region_hash 12085 1 dm_mirrordm_log 9930 2 dm_mirror,dm_region_hashdm_mod 82839 one dm_mirror,dm_log 

Xi. env # View environment variable resources

less_termcap_mb=Hostname=Localhost.localdomainless_termcap_md=Less_termcap_me=term=xtermshell=/bin/bashhistsize=1000nls_lang=American_america. al32utf8ssh_client=192.168.1.104 2465 22qtdir=/usr/lib64/qt-3.3oldpwd=/Homeless_termcap_ue=qtinc=/usr/lib64/qt-3.3/Includessh_tty=/dev/pts/1User=rootld_library_path=/usr/lib/oracle/11.2/client64/LIB:LS_COLORS=RS=0:DI=01;34:LN=01;36:MH=00:PI=40;33:SO=01;35:DO=01;35:BD=40;33;01:CD=40;33;01:Or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01 ; 31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*. Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31 :*. deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*. jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*. xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*. mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*. qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv =01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01; 35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg= 01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36: oracle_base=/usr/lib/oracle/11.2less_termcap_us=mail=/var/spool/mail/rootpath=/usr/lib64/ Qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/erlang/bin:/home/rabbitmq_ server-3.3.1/sbin/:/usr/lib/oracle/11.2/client64/bin:/root/binpwd=/lang=zh_cn. UTF-8kde_is_prelinked=1modulepath=/usr/share/modules/modulefiles:/etc/modulefilesloadedmodules= kdedirs=/usrssh_askpass=/usr/libexec/openssh/gnome-ssh-askpasshistcontrol=ignoredupsshlvl=1 

12. Free-m # View memory usage and swap area usage

                    Total used       free     shared    buffers     cachedmem:          3706       3534        171          0       3258-/+ Buffers/cache:        244       3461Swap:         3711          0       3711[[email protected]/]  

13, Df-h # View the usage of each partition

[[email protected]/] # Df-h file system          capacity  has been used with  available percent mount point/dev/mapper/volgroup-lv_root                       50G  6.4G   41G  14%/tmpfs                 1.9G   72K  1.9G   1%/dev/shm/dev/sda1 485M 38M 422M 9%/boot/dev/ mapper/volgroup-lv_home 406G 2.8G 382G 1%        /Home

The following is not a demonstration


14, Du-sh # View the size of the specified directory
15. grep Memtotal/proc/meminfo # View Total Memory
16. grep Memfree/proc/meminfo # View the amount of free memory
17. Uptime # View System uptime, number of users, load
18. Cat/proc/loadavg # View system load disks and partitions
19, Mount | column-t # View the status of the attached partition
20. Fdisk-l # View all partitions
21. Swapon-s # View all swap partitions
22. Hdparm-i/dev/hda # View disk parameters (for IDE devices only)
23, DMESG | grep IDE # VIEW IDE device detection network at startup
24. Ifconfig # View the properties of all network interfaces
25. Iptables-l # View firewall settings
26. Route-n # View the routing table
27. NETSTAT-LNTP # View all listening ports
28. NETSTAT-ANTP # View all established connections
29. Netstat-s # Viewing the network statistics process
30. Ps-ef # View All Processes
31, Top # Real-time display process status users
32. W # View Active Users
33. ID # View specified user information
34. Last # View user log in log
35, cut-d:-F1/ETC/PASSWD # View All users of the system
36, cut-d:-f1/etc/group # View all system groups
37. Crontab-l # View the current user's scheduled tasks service
37. Chkconfig–list # List all system services
38, Chkconfig–list | grep on # Lists all started system services programs
39. Rpm-qa # View all installed Packages
40. Cat/proc/cpuinfo: Linux system commands to view CPU-related parameters
41, Cat/proc/partitions: View the Linux hard disk and partition information System Information command
42. Cat/proc/meminfo: Linux system command to view Linux system memory information
43, Cat/proc/version: View version, similar to Uname-r
44. Cat/proc/ioports: View device IO port
45. Cat/proc/interrupts: View interrupts
46. CAT/PROC/PCI: View PCI Device information
47. Cat/proc/swaps: View information for all swap partitions

View common commands for Linux systems, Linux View system configuration common commands

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.