Home  >  Article  >  Operation and Maintenance  >  what is linux i386

what is linux i386

青灯夜游
青灯夜游Original
2023-04-11 17:04:433587browse

In Linux, i386 refers to the type of CPU, and it can also refer to the architecture of the CPU. Linux was first developed as a POSIX-compatible kernel on the 386 architecture; later, although the performance of the CPU became higher, it was always compatible with the "386" architecture. Therefore, various programs running on Linux only need to be compiled on the "386" After that, it can run on most PCs.

what is linux i386

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What does "i386" mean in Linux

i386 refers to the type of CPU, and it can also refer to the architecture of the CPU.

Today’s CPUs are generally called by cooler names such as “Core 2 Duo” or “Athlon”, “Xeon”, and “Opteron”. When Linux was born, the CPU was an important component and was generally referred to by its model number.

The i in i386 stands for Intel, which was first produced by Intel. Among the CPU series starting from 4004, 386 (80386) was the first 32-bit CPU. Linux was originally developed as a POSIX-compatible kernel on the 386 architecture. Although the performance of the CPU has become higher since then, it has always been compatible with the "386" architecture. Therefore, various programs running on Linux can run on most PCs as long as they are compiled on the "386".

However, "386" was born in 1985, which looks very old now. Many Linux distributions now are targeted at CPUs after "Pentium". Software packages containing "i586" in their names are for "Pentium" architecture CPUs. The "i686" seen with the uname command in Linux refers to the architecture after "Pentium Pro".

Perhaps we may think that on machines with "i586" or "i686" architecture CPUs, using binary applications compiled for "i586" or "i686" will be more efficient than binary applications compatible with the "386" architecture. good.

But in actual use, on machines with "i586" or "i686" architecture CPUs, no significant performance improvement was found using binary applications compiled under "i586" or "i686".

Therefore, for the sake of versatility, it is better to only choose the kernel with the same architecture as the CPU when installing Linux, and various programs running on the Linux kernel can be directly compiled under the "i386" architecture. Just install the software package.

Now many software packages in Linux distributions do this. The most important thing is that they can run normally.

Extended knowledge: Check the CPU, machine model, memory and other information in Linux system

It may be necessary to check the CPU usage at any time during system maintenance. And analyze the needs of the system status based on the corresponding information. In Linux, you can use the top command to view CPU usage. For detailed instructions on the top command, please refer to the article Detailed explanation of using the top command to analyze Linux system performance.

The top command is a commonly used performance analysis tool under Linux. It can display the resource usage of each process in the system in real time, similar to the Windows Task Manager; but here we mainly introduce how to view CPU information in the Linux system. , machine model, memory information, etc.

System

# uname -a        # 查看内核/操作系统/CPU信息
# head -n 1 /etc/issue  # 查看操作系统版本
# cat /proc/cpuinfo   # 查看CPU信息
# hostname        # 查看计算机名
# lspci -tv       # 列出所有PCI设备
# lsusb -tv       # 列出所有USB设备
# lsmod         # 列出加载的内核模块
# env          # 查看环境变量

Resources

# free -m        # 查看内存使用量和交换区使用量
# df -h         # 查看各分区使用情况
# du -sh <目录名>    # 查看指定目录的大小
# grep MemTotal /proc/meminfo  # 查看内存总量
# grep MemFree /proc/meminfo  # 查看空闲内存量
# uptime         # 查看系统运行时间、用户数、负载
# cat /proc/loadavg   # 查看系统负载

Disk and partition

# mount | column -t   # 查看挂接的分区状态
# fdisk -l        # 查看所有分区
# swapon -s       # 查看所有交换分区
# hdparm -i /dev/hda   # 查看磁盘参数(仅适用于IDE设备)
# dmesg | grep IDE    # 查看启动时IDE设备检测状况

network

# ifconfig        # 查看所有网络接口的属性
# iptables -L      # 查看防火墙设置
# route -n        # 查看路由表
# netstat -lntp     # 查看所有监听端口
# netstat -antp     # 查看所有已经建立的连接
# netstat -s       # 查看网络统计信息

process

# ps -ef         # 查看所有进程
# top          # 实时显示进程状态

User

# w           # 查看活动用户
# id <用户名>      # 查看指定用户信息
# last          # 查看用户登录日志
# cut -d: -f1 /etc/passwd  # 查看系统所有用户
# cut -d: -f1 /etc/group  # 查看系统所有组
# crontab -l       # 查看当前用户的计划任务

Service

# chkconfig --list    # 列出所有系统服务
# chkconfig --list | grep on  # 列出所有启动的系统服务

Program

# rpm -qa        # 查看所有安装的软件包

View CPU information (model)

# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 
   8 Intel(R) Xeon(R) CPU      E5410  @ 2.33GHz 
(看到有8个逻辑CPU, 也知道了CPU型号) 

# cat /proc/cpuinfo | grep physical | uniq -c 
   4 physical id   : 0 
   4 physical id   : 1 
(说明实际上是两颗4核的CPU) 

# getconf LONG_BIT 
  32 
(说明当前CPU运行在32bit模式下, 但不代表CPU不支持64bit) 

# cat /proc/cpuinfo | grep flags | grep &#39; lm &#39; | wc -l 
  8 
(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)

Review the complete cpu details, But most of us don’t care.

# dmidecode | grep &#39;Processor Information&#39;

View memory information

# cat /proc/meminfo 

# uname -a 
Linux euis1 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux 
(查看当前操作系统内核信息) 

# cat /etc/issue | grep Linux 
Red Hat Enterprise Linux AS release 4 (Nahant Update 5) 
(查看当前操作系统发行版信息)

View machine model

# dmidecode | grep "Product Name"

View network card information

# dmesg | grep -i eth

Related recommendations: "Linux Video Tutorial

The above is the detailed content of what is linux i386. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is linux rpc.statdNext article:What is linux rpc.statd