Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A simple CLI tool on how to get CPU information in Linux

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to get CPU information in Linux simple CLI tool", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "how to get CPU information in Linux simple CLI tool"!

CPUFetch is a simple command-line tool, somewhat similar to Neofetch, but used to get the CPU architecture in Linux,Windows,macOS and Android.

The tool outputs the manufacturer's logo (such as Intel,AMD) as well as basic CPU information, including:

CPU name.

Micro architecture.

Semiconductor technology of nanometer (nm).

Maximum frequency.

Number of cores and threads.

Advanced Vector extension (AVX)

Fusion multiplication plus (FMA)

The cache size of L1, L2, and L3.

Peak performance.

It supports custom colors and provides some styles (themes). With it, you can easily get screenshots of CPU information and share them with your friends.

How to install CPUFetch in Ubuntu:

So far, CPUFetch does not provide a Ubuntu binary package. However, it is easy to compile on Linux.

1.) first open the terminal from the system application initiator. When it is on, run the command to clone the source:

Linuxmi@linuxmi:~/www.linuxmi.com$ git clone https://github.com/Dr-Noob/cpufetch is being cloned to 'cpufetch'... Remote: Enumerating objects: 436, done. Remote: Counting objects: 100%, done. Remote: Compressing objects: 100% (262), done. Remote: Total 1442 (delta 270,330), reused 1006 (delta 1006), pack-reused 1006 receiver: 100% (1442 KiB), 656.65 KiB/s | 586.00 KiB/s, complete. Processing delta: 100% (963 Universe 963), complete.

If not, install git through the sudo apt install git command.

2.) then navigate to the source folder with the cd command and compile it through make:

Linuxmi@linuxmi:~/www.linuxmi.com$ cd cpufetch & & make gcc-Wall-Wextra-Werror-pedantic-fstack-protector-all-pedantic-std=c99-DARCH_X86-Wfloat-equal-Wshadow-Wpointer-arith src/common/main.c src/common/cpu.c src/common/udev.c src/common/printer.c src/common/args.c src/common/global.c src/x86/cpuid.c src/x86/apic.c src/x86/cpuid_asm.c src/x86/uarch.c-o cpufetch

3.) you can now run the tool from this directory with the. / cpufetch command!

To be able to run anywhere in the terminal through the cpufetch command, copy the executable file to / usr/local/bin/:

Linuxmi@linuxmi:~/www.linuxmi.com$ sudo mv ~ / cpufetch/cpufetch / usr/local/bin/

Uninstall:

To delete the source folder, run the command:

Linuxmi@linuxmi:~/www.linuxmi.com$ rm ~ / cpufetch-rf

And delete the executable file with the command:

Linuxmi@linuxmi:~/www.linuxmi.com$ sudo rm / usr/local/bin/cpufetch Thank you for your reading, the above is the content of "how to get CPU information in Linux simple CLI tool", after the study of this article, I believe you have a deeper understanding of how to obtain CPU information in Linux simple CLI tool, the specific use of the situation also needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report