What is the meaning of linux i386

PHPz
Release: 2023-05-17 09:26:01
forward
1860 people have browsed it

i386 can represent the type or architecture of the CPU in Linux. 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 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”. In the early days of Linux, the CPU was considered a very important component and was often 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 to be a POSIX-compliant kernel based 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 today are developed specifically for devices starting with Pentium CPUs. "i586" labeled software packages are designed for CPUs with the "Pentium" architecture.. In Linux, when using the uname command, the "i686" displayed indicates support for Pentium Pro and later architectures.

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 CPU, machine model, memory and other information on Linux system

You need to check the CPU usage at any time during system maintenance and analyze the system status accordingly. To view CPU usage, you can use the top command in Linux. Please refer to this article: "Detailed Explanation of Using the Top Command to Analyze Linux System Performance" for a detailed description of the top command.

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          # 查看环境变量
Copy after login

Resources

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

Disks and Partitions

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

Network

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

Process

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

User

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

Service

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

Program

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

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)
Copy after login

Look at the cpu details again, but most of us I don’t care.

# dmidecode | grep &#39;Processor Information&#39;
Copy after login

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) 
(查看当前操作系统发行版信息)
Copy after login

View machine model

# dmidecode | grep "Product Name"
Copy after login

View network card information

# dmesg | grep -i eth
Copy after login

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

Related labels:
source:yisu.com
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template