1. What is linux distribution
Linux on the essence, it is only the core operating system, responsible for controlling the hardware, file system management, program processes, etc., does not provide a variety of tools and applications to users.
The so-called advance preparation of its profits are, in a good operating system kernel, if not powerful application software can be used,
is unable to play its powerful features, users can not only use this system to work the core ,
so people with Linux kernel as the center, and then integrated with a wide variety of system management software or application software tools form a complete operating system,
so the combination will be known as Linux distributions.
GNU / Linux is open source, so long as everyone follows the rules of the community can develop their own release,
now known to have release of more than 300 Linux.
Our practice may only use several versions, so we just need to know some of the more well-known distributions like.
Red Hat
The most famous version of Linux, Red Hat Linux has become a brand. Red Hat business in 1994, was hired more than 500 employees worldwide, who are committed to an open source system. It has its own company, we can provide a complete set of services to users, which makes it particularly suitable for use in the public network. This version of the Linux kernel also uses the latest, also has the main package most people want to use. Red Hat Linux using the graphical installation, the installation process can be simple to set all of the information server is also very simple. Disk partitioning process can be done automatically, you can also choose to complete GUI tool, even for novice Linux these are very simple. Select the package process is similar to other versions; the user can select the type of package or special packages. After the system is up and running, users can get full technical support from Red Hat Web site and there. Red Hat is a public demand in line with the optimal version of (I'll tell you, you just take the money line thing). In server and desktop systems, it works very well. Red Hat is the only flaw with some non-standard kernel patch, which makes it difficult to be customized according to user needs. Red Hat through forums and mailing lists provided extensive technical support, as well as its own company's technical phone support for corporate customers who require higher levels of technical support more attractive.
Debian
Debian goal is to provide a stable and fault-tolerant version of Linux. Support for Debian is not a company, but many developers put a lot of time in their improvement process, this improvement learned early Linux experience. The reason Debian sought stability of the system, because the software update is slow, but stability has become a favorite of many IT staff.
Ubuntu
Ubuntu is a Debian-based hair, but the software update frequency is relatively high. It offers two main versions, a desktop version, a server version, but pay more attention to the desktop version of Ubuntu. When the release version of Ubuntu, will release a LTS version, this version will provide up to three years to upgrade support.
CentOS
CentOS from Red Hat Enterprise Linux release in accordance with the provisions of the open-source source code compiled with. Because from the same source code, so some require a high degree of stability CentOS server to replace the commercial version of Red Hat Enterprise Linux use. Difference between the two is that CentOS does not include closed source software, CentOS is based on Red Hat Linux can provide enterprise-class Linux distributions are free to use the source code. Each version of CentOS will get years of support (by way of security updates). The new version of CentOS issued once every two years and each CentOS version is periodically (about every six months) updated to support new hardware. In this way, the establishment of a safe, low-maintenance, stable, high predictability and reproducible Linux environment.
SuSE
SuSE is headquartered in Germany, it has struggled for years. SuSE Linux has been committed to creating the best version of a connection to the database. To achieve this, SuSE cooperation with Oracle and IBM, to enable their products to work reliably. SuSE hardware detection is very good, this version will use very well on servers and workstations. SuSE has a user-friendly installation process, as well as a graphical management tool, provides easy access to Windows disks, it is also easy to use for end users and administrators, making it a powerful server platform.
Fedora
Fedora Linux is a free system developed from the Red Hat Linux. Fedora consists of a strong community, the members of this community with their tireless efforts to provide and maintain a free, open source software and open standards. Fedora project management and control by the Fedora Foundation, is supported by Red Hat, Inc.'s. Red Hat will be some leading technologies into Fedora test, it uses the RPM package to install the software and provide repo this package manager to simplify the installation process packages and upgrades from one package.
2, understand linux software and hardware information
2.1 Version information
1, core edition
[root@localhost ~]# cat /proc/version Linux version 3.10.0-957.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Thu Nov 8 23:39:32 UTC 2018 [root@localhost ~]# uname -a Linux localhost.localdomain 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
2, view the operating system version
[root@localhost ~]# more /etc/redhat-release CentOS Linux release 7.6.1810 (Core) [root@localhost ~]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.6.1810 (Core) Release: 7.6.1810 Codename: Core
2.2 View cpu info
Cpu information can be obtained by viewing the / proc / cpuinfo file.
[root@localhost ~]# more /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 79 model name : Intel(R) Xeon(R) CPU E5-2609 v4 @ 1.70GHz stepping : 1 microcode : 0xb00001d cpu MHz : 1696.073 cache size : 20480 KB physical id : 0 siblings : 6 core id : 0 cpu cores : 6 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 20 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_ tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadli ne_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch epb fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 invpcid rtm rdseed adx smap xsaveopt dtherm arat pln pts bogomips : 3392.14 clflush size : 64 cache_alignment : 64 address sizes : 42 bits physical, 48 bits virtual power management: ......
The main parameters can be used to understand a few:
vendor_id: CPU manufacturers, Intel processor, the string is GenuineIntel cpu Family: the CPU product family, code-named model: CPU property of their series which generation of code model name: CPU belonging to the name and number, nominal frequency cpu MHz: actual frequency of the CPU cache size: CPU L2 cache physical id: single CPU numeral siblings: single logical-physical CPU Audit core id: numbers in their current physical nucleus which the CPU, this number is not necessarily continuous cpu cores: the number of physical core logic of the CPU core is located fpu_exception: support floating point exception wp: indicate whether the CPU is currently in kernel mode support for user space write protection (the write protection) the flags: current CPU supported features bogomips : when the system kernel boot rough estimates of CPU speed clflush size: each time you refresh the cache size unit
Of course, we have some real work commonly used commands, we can easily find out the information they want to know as soon as possible.
First of all we need to know a few concepts
Logical CPU core (the number of CPU threads, Thread): Hyper-Threading technology, can a physical core into a plurality of logical cores.
CPU (processor) Number: number (physical encapsulation) CPU chip slot on the motherboard.
Physical Audit (Core) CPU: the number of cores included in a physical CPU (Core)
Physical CPU = CPU number × total nucleated physical audit server (cpu cores) of each CPU
CPU = CPU number of total nucleated logical server × number of logical cores (SIBLINGS) of each CPU
cat / proc / cpuinfo | grep " physical id" | uniq | wc -l number of physical CPU slot machine of cat / proc / cpuinfo | grep " processor" | sort -u | wc -l total number of logical processors cat / proc / cpuinfo | grep "cpu cores" | sort | uniq number in each physical CPU Core the cat / proc / cpuinfo | grep " core id" | sort -u | core on the total number of all physical CPU wc -l
2.3dmidecode Query
If you need to get some information linux hardware, such as servers and you want to know how many memory slots, you're going to count one by one server apart, obviously this is a very low-level.
dmidecode allows you to get information about the hardware in the Linux system.
dmidecode follow SMBIOS / DMI standard, which information output includes BIOS, System, board, processor, memory, cache and other information.
dmidecode will output all hardware information.
[root@localhost ~]# dmidecode|wc -l 9691
Nearly ten thousand pieces of information, obviously not a bar to see, we just need to filter that we used the command line.
dmidecode -t 2 view motherboard information
[root@localhost ~]# dmidecode -t 2 # dmidecode 3.1 Getting SMBIOS data from sysfs. SMBIOS 3.2 present. # SMBIOS implementations newer than version 3.1.1 are not # fully supported by this version of dmidecode. Handle 0x0002, DMI type 2, 15 bytes Base Board Information Manufacturer: Inspur Product Name: YZMB-00882-104 Version: NF5280M5 #服务器型号 Serial Number: MBK329W30929A90 Asset Tag: 219291812 #系统序列号 Features: Board is a hosting board Board is replaceable Location In Chassis: Default string Chassis Handle: 0x0003 Type: Motherboard Contained Object Handles: 0
dmidecode -t 16 query memory information
[root@localhost ~]# dmidecode -t 16 # dmidecode 3.1 Getting SMBIOS data from sysfs. SMBIOS 3.2 present. # SMBIOS implementations newer than version 3.1.1 are not # fully supported by this version of dmidecode. Handle 0x0042, DMI type 16, 23 bytes Physical Memory Array Location: System Board Or Motherboard Use: System Memory Error Correction Type: Single-bit ECC Maximum Capacity: 9 TB #系统支持最大内存数 Error Information Handle: Not Provided Number Of Devices: 24 #服务器内存卡槽数
You can use the following command to query the memory size and the number of memory plug
dmidecode|grep -P -A5 "Memory Device" |grep Size
[root@localhost ~]# dmidecode|grep -P -A5 "Memory Device" |grep Size Size: 64 GB Size: 64 GB Size: 64 GB Size: 64 GB Size: No Module Installed Size: No Module Installed Size: 64 GB Size: 64 GB Size: 64 GB Size: 64 GB Size: No Module Installed Size: No Module Installed Size: 64 GB Size: 64 GB Size: 64 GB Size: 64 GB Size: No Module Installed Size: No Module Installed Size: 64 GB Size: 64 GB Size: 64 GB Size: 64 GB Size: No Module Installed Size: No Module Installed
You can use the following command to query memory rate
dmidecode|grep -A16 "Memory Device"|grep 'Speed'
[root@localhost ~]# dmidecode|grep -A16 "Memory Device"|grep 'Speed' Speed: 2666 MT/s Speed: 2666 MT/s Speed: 2666 MT/s Speed: 2666 MT/s Speed: Unknown Speed: Unknown Speed: 2666 MT/s Speed: 2666 MT/s Speed: 2666 MT/s Speed: 2666 MT/s Speed: Unknown Speed: Unknown Speed: 2666 MT/s Speed: 2666 MT/s Speed: 2666 MT/s Speed: 2666 MT/s Speed: Unknown Speed: Unknown Speed: 2666 MT/s Speed: 2666 MT/s Speed: 2666 MT/s Speed: 2666 MT/s Speed: Unknown Speed: Unknown