<!DOCTYPE html>
    <html lang="vi" xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#">
    <head>
<title>Cách lấy thông tin chi tiết về CPU trên hệ thống Linux</title>
<meta name="description" content="Cách lấy thông tin chi tiết về CPU trên hệ thống Linux - Savefile - Tin Tức -...">
<meta name="author" content=".: Nguoicodonvn2008.info - Cõi lòng người cô đơn :.">
<meta name="copyright" content=".: Nguoicodonvn2008.info - Cõi lòng người cô đơn :. [admin@nguoicodonvn2008.info]">
<meta name="robots" content="index, archive, follow, noodp">
<meta name="googlebot" content="index,archive,follow,noodp">
<meta name="msnbot" content="all,index,follow">
<meta name="generator" content="NukeViet v4.5">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta property="og:title" content="Cách lấy thông tin chi tiết về CPU trên hệ thống Linux">
<meta property="og:type" content="website">
<meta property="og:description" content="Savefile - Tin Tức - https&#x3A;&#x002F;&#x002F;www.nguoicodonvn2008.info&#x002F;vi&#x002F;news&#x002F;savefile&#x002F;kien-thuc-may-tinh&#x002F;cach-lay-thong-tin-chi-tiet-ve-cpu-tren-he-thong-linux-10443.html">
<meta property="og:site_name" content=".&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;.">
<meta property="og:url" content="https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/cach-lay-thong-tin-chi-tiet-ve-cpu-tren-he-thong-linux-10443.html">
<link rel="shortcut icon" href="https://nguoicodonvn2008.info/favicon.ico">
<link rel="canonical" href="https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/cach-lay-thong-tin-chi-tiet-ve-cpu-tren-he-thong-linux-10443.html">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/" title="Tin Tức" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/karaoke-dual/" title="Tin Tức - Karaoke Dual" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/nhac-tre/" title="Tin Tức - Nhạc trẻ" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/tru-tinh/" title="Tin Tức - Trữ tình" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/nuoc-ngoai/" title="Tin Tức - Nước ngoài" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/remix/" title="Tin Tức - Remix" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/tam-su-tinh-yeu/" title="Tin Tức - Tâm sự tình yêu" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/tho-suu-tam/" title="Tin Tức - Thơ sưu tầm" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/cuoc-song/" title="Tin Tức - Cuộc sống" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/phan-mem/" title="Tin Tức - Phần mềm" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/kien-thuc-may-tinh/" title="Tin Tức - Kiến thức máy tính" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/hoc-tap/" title="Tin Tức - Học tập" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/tai-lieu/" title="Tin Tức - Tài liệu" type="application/rss+xml">
<link rel="alternate" href="https://nguoicodonvn2008.info/vi/news/rss/de-thi/" title="Tin Tức - Đề thi" type="application/rss+xml">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/assets/css/font-awesome.min.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/bootstrap.non-responsive.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/style.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/style.non-responsive.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/news.css" type="text/css">
<link rel="preload" as="style" href="https://nguoicodonvn2008.info/themes/default/css/custom.css" type="text/css">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/jquery/jquery.min.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/language/vi.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/DOMPurify/purify3.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/global.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/assets/js/site.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/themes/default/js/news.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/themes/default/js/main.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/themes/default/js/custom.js" type="text/javascript">
<link rel="preload" as="script" href="https://nguoicodonvn2008.info/themes/default/js/bootstrap.min.js" type="text/javascript">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/assets/css/font-awesome.min.css">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/themes/default/css/bootstrap.non-responsive.css">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/themes/default/css/style.css">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/themes/default/css/style.non-responsive.css">
<link rel="StyleSheet" href="https://nguoicodonvn2008.info/themes/default/css/news.css">
<link rel="stylesheet" href="https://nguoicodonvn2008.info/themes/default/css/custom.css">
<style type="text/css">
	body{background: #fff;}
</style>
    </head>
    <body>
<div id="print">
	<div id="hd_print">
		<h2 class="pull-left">.&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;.</h2>
		<p class="pull-right"><a title=".&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;." href="https://nguoicodonvn2008.info/">https://nguoicodonvn2008.info</a></p>
	</div>
	<div class="clear"></div>
	<hr />
	<div id="content">
		<h1>Cách lấy thông tin chi tiết về CPU trên hệ thống Linux</h1>
		<ul class="list-inline">
			<li>Chủ nhật - 25/05/2025 23:27</li>
			<li class="hidden-print txtrequired"><em class="fa fa-print">&nbsp;</em><a title="In ra" href="javascript:;" onclick="window.print()">In ra</a></li>
			<li class="hidden-print txtrequired"><em class="fa fa-power-off">&nbsp;</em><a title="Đóng cửa sổ này" href="javascript:;" onclick="window.close()">Đóng cửa sổ này</a></li>
		</ul>
		<div class="clear"></div>
		<div id="hometext">
		</div>
				<div class="imghome">
			<img alt="Cách lấy thông tin chi tiết về CPU trên hệ thống Linux" src="https://st.quantrimang.com/photos/image/2025/05/24/Lay-khoi-Ghast-kho-Minecraft-700-size-300x0-znd.jpg" width="460" class="img-thumbnail" />
		</div>
		<div class="clear"></div>
		<div id="bodytext" class="clearfix">
			<p style="text-align: justify;">Một trong những điều mà quản trị viên Linux yêu thích nhất là tìm hiểu sâu về các chi tiết nhỏ nhặt của thông tin hệ thống. Hôm nay, Quantrimang.com sẽ đưa bạn đi khám phá cách lấy và hiểu thông tin CPU trên hệ thống Linux. Bài viết sẽ sử dụng&nbsp;Ubuntu&nbsp;làm ví dụ, nhưng cũng sẽ cung cấp các lệnh liên quan đến những bản phân phối phổ biến khác.</p>

<div style="text-align: justify;">&nbsp;</div>

<h2 style="text-align: justify;">Sử dụng file /proc/cpuinfo</h2>

<p style="text-align: justify;">File /proc/cpuinfo chứa thông tin chi tiết về&nbsp;CPU&nbsp;trên hệ thống của bạn. Đây là một file ảo, nghĩa là nó không tồn tại vật lý trên ổ đĩa nhưng được tạo động bởi kernel.</p>

<h3 style="text-align: justify;">Cách đọc /proc/cpuinfo</h3>

<p style="text-align: justify;">Để xem nội dung của /proc/cpuinfo, chỉ cần sử dụng&nbsp;lệnh cat&nbsp;trong terminal:</p>

<pre id="pre0">
<code>cat /proc/cpuinfo</code></pre>

<p style="text-align: justify;">Sau đây là một đoạn trích mẫu đầu ra từ máy Ubuntu ví dụ:</p>

<pre id="pre1">
<code>processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 158
model name  : Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
stepping    : 10
microcode   : 0xca
cpu MHz     : 800.000
cache size  : 9216 KB
physical id : 0
siblings    : 12
core id     : 0
cpu cores   : 6
apicid      : 0
initial apicid : 0
fpu         : yes
fpu_exception : yes
cpuid level : 22
wp          : yes
...</code></pre>

<h3 style="text-align: justify;">Phân tích đầu ra</h3>

<ul>
	<li style="text-align: justify;"><strong>processor:</strong>&nbsp;Số bộ xử lý. Nếu có CPU đa lõi, bạn sẽ thấy nhiều mục nhập (0, 1, 2, …).</li>
	<li style="text-align: justify;"><strong>vendor_id:</strong>&nbsp;Nhà sản xuất CPU (ví dụ: GenuineIntel, AuthenticAMD).</li>
	<li style="text-align: justify;"><strong>model name:</strong>&nbsp;Tên chính thức của CPU.</li>
	<li style="text-align: justify;"><strong>cpu MHz:</strong>&nbsp;Tốc độ xung nhịp hiện tại của CPU tính bằng MHz.</li>
	<li style="text-align: justify;"><strong>cache size:</strong>&nbsp;Kích thước của L2 cache tính bằng KB.</li>
	<li style="text-align: justify;"><strong>cpu cores:</strong>&nbsp;Số lõi trên mỗi CPU vật lý.</li>
	<li style="text-align: justify;"><strong>brothers:</strong>&nbsp;Số bộ xử lý logic trên mỗi CPU vật lý. Bao gồm cả lõi siêu phân luồng.</li>
</ul>

<div style="text-align: justify;">&nbsp;</div>

<h2 style="text-align: justify;">Sử dụng lệnh lscpu</h2>

<p style="text-align: justify;">Lệnh lscpu cung cấp bản tóm tắt dễ đọc về thông tin kiến ​​trúc CPU.</p>

<h3 style="text-align: justify;">Cách sử dụng lscpu</h3>

<p style="text-align: justify;">Chỉ cần nhập lscpu vào terminal:</p>

<pre id="pre2">
<code>lscpu</code></pre>

<p style="text-align: justify;">Sau đây là ví dụ về đầu ra:</p>

<pre id="pre3">
<code>Architecture:           x86_64
CPU op-mode(s):         32-bit, 64-bit
Byte Order:             Little Endian
Address sizes:          39 bits physical, 48 bits virtual
CPU(s):                 12
On-line CPU(s) list:    0-11
Thread(s) per core:     2
Core(s) per socket:     6
Socket(s):              1
NUMA node(s):           1
Vendor ID:              GenuineIntel
CPU family:             6
Model:                  158
Model name:             Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Stepping:               10
CPU MHz:                900.000
CPU max MHz:            4100.0000
CPU min MHz:            800.0000
BogoMIPS:               4399.93
Virtualization:         VT-x
L1d cache:              192 KiB
L1i cache:              192 KiB
L2 cache:               1.5 MiB
L3 cache:               9 MiB
NUMA node0 CPU(s):      0-11
Flags:                  fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperf ...</code></pre>

<h3 style="text-align: justify;">Chi tiết chính trong đầu ra lscpu</h3>

<ul>
	<li style="text-align: justify;"><strong>Architecture</strong>: Kiến trúc CPU (ví dụ: x86_64).</li>
	<li style="text-align: justify;"><strong>CPU(s)</strong>: Tổng số CPU (bộ xử lý logic).</li>
	<li style="text-align: justify;"><strong>Thread(s) per core</strong>: Số luồng trên mỗi lõi (thường là 2 đối với lõi siêu phân luồng).</li>
	<li style="text-align: justify;"><strong>Core(s) per socket</strong>: Số lõi trên mỗi socket.</li>
	<li style="text-align: justify;"><strong>Socket</strong>: Số lượng socket CPU vật lý.</li>
	<li style="text-align: justify;"><strong>CPU max MHz / min MHz</strong>: Tần số CPU tối đa và tối thiểu.</li>
	<li style="text-align: justify;"><strong>L1d, L1i, L2, L3 cache</strong>: Kích thước cache cho các cấp độ khác nhau.</li>
</ul>

<h2 style="text-align: justify;">Sử dụng lệnh lshw</h2>

<p style="text-align: justify;">Lệnh lshw (list hardware) cung cấp thông tin chi tiết về tất cả các thành phần phần cứng, bao gồm cả CPU.</p>

<h3 style="text-align: justify;">Cách sử dụng lshw để biết thông tin về CPU</h3>

<p style="text-align: justify;">Để có thông tin về CPU, bạn có thể lọc đầu ra lshw:</p>

<pre id="pre4">
<code>sudo lshw -class processor</code></pre>

<p style="text-align: justify;">Đây là một mẫu đầu ra:</p>

<pre id="pre5">
<code> *-cpu                   
       description: CPU
       product: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
       vendor: Intel Corp.
       physical id: 3
       bus info: cpu@0
       version: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
       slot: U3E1
       size: 2200MHz
       capacity: 4100MHz
       width: 64 bits
       clock: 100MHz
       capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperf...
       configuration: cores=6 enabledcores=6 threads=12</code></pre>

<div style="text-align: justify;">&nbsp;</div>

<h3 style="text-align: justify;">Thông tin chi tiết chính trong đầu ra lshw</h3>

<ul>
	<li style="text-align: justify;"><strong>description</strong>: Mô tả về CPU.</li>
	<li style="text-align: justify;"><strong>product</strong>: Kiểu CPU.</li>
	<li style="text-align: justify;"><strong>vendor</strong>: Nhà sản xuất.</li>
	<li style="text-align: justify;"><strong>size</strong>: Tần số hoạt động hiện tại.</li>
	<li style="text-align: justify;"><strong>capacity</strong>: Tần số tối đa.</li>
	<li style="text-align: justify;"><strong>width</strong>: Độ rộng bit (ví dụ: 64 bit).</li>
	<li style="text-align: justify;"><strong>configuration</strong>: Số lõi và luồng.</li>
</ul>

<h2 style="text-align: justify;">Các bước dành riêng cho từng bản phân phối</h2>

<p style="text-align: justify;">Mặc dù các lệnh trên hầu hết đều mang tính phổ biến, nhưng có thể có một số thay đổi nhỏ hoặc những công cụ bổ sung có sẵn trên các bản phân phối khác nhau.</p>

<h3 style="text-align: justify;">Đối với các bản phân phối dựa trên Debian (như Ubuntu)</h3>

<p style="text-align: justify;">Các lệnh và công cụ được đề cập ở trên có thể áp dụng trực tiếp. Đảm bảo bạn đã cài đặt gói lshw:</p>

<pre id="pre6">
<code>sudo apt-get install lshw</code></pre>

<h3 style="text-align: justify;">Đối với các bản phân phối dựa trên Red Hat (như CentOS, Fedora)</h3>

<p style="text-align: justify;">Bạn có thể cần cài đặt lshw bằng yum hoặc dnf:</p>

<pre id="pre7">
<code>sudo yum install lshw   # for CentOS
sudo dnf install lshw   # for Fedora</code></pre>

<h3 style="text-align: justify;">Đối với các bản phân phối dựa trên Arch</h3>

<p style="text-align: justify;">Bạn có thể cài đặt lshw bằng pacman:</p>

<pre id="pre8">
<code>sudo pacman -S lshw</code></pre>

<p style="text-align: justify;">Khám phá thông tin CPU trên Linux không chỉ là cách tuyệt vời để tìm hiểu thêm về phần cứng của bạn mà còn rất quan trọng đối với việc tối ưu hóa và khắc phục sự cố hệ thống. Thật thú vị khi xem các chi tiết phức tạp của CPU và hiểu cách nó cung cấp năng lượng cho những tác vụ hàng ngày của bạn.</p>

<p style="text-align: justify;">Hãy thoải mái khám phá các lệnh này và tìm hiểu sâu hơn về chi tiết CPU của riêng bạn. Bạn có thể khám phá ra điều gì đó mới mẻ và thú vị về hệ thống của mình!</p>

<div style="text-align: justify;">&nbsp;</div>
		</div>
				<div id="author">
						<p>
				<strong>Nguồn tin:</strong>
				Quantrimang.com:
			</p>
		</div>
	</div>
	<div id="footer" class="clearfix">
		<div id="url">
			<strong>URL của bản tin này: </strong><a href="https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/cach-lay-thong-tin-chi-tiet-ve-cpu-tren-he-thong-linux-10443.html" title="Cách lấy thông tin chi tiết về CPU trên hệ thống Linux">https://www.nguoicodonvn2008.info/vi/news/savefile/kien-thuc-may-tinh/cach-lay-thong-tin-chi-tiet-ve-cpu-tren-he-thong-linux-10443.html</a>

		</div>
		<div class="clear"></div>
		<div class="copyright">
			&copy; .&#x3A; Nguoicodonvn2008.info - Cõi lòng người cô đơn &#x3A;.
		</div>
		<div id="contact">
			<a href="mailto:admin@nguoicodonvn2008.info">admin@nguoicodonvn2008.info</a>
		</div>
	</div>
</div>
        <div id="timeoutsess" class="chromeframe">
            Bạn đã không sử dụng Site, <a onclick="timeoutsesscancel();" href="https://nguoicodonvn2008.info/#">Bấm vào đây để duy trì trạng thái đăng nhập</a>. Thời gian chờ: <span id="secField"> 60 </span> giây
        </div>
        <div id="openidResult" class="nv-alert" style="display:none"></div>
        <div id="openidBt" data-result="" data-redirect=""></div>
		</script>
		<div class="car-top">
  <span><img src="https://nguoicodonvn2008.info/themes/default/images/car.png" alt=""></span>
</div>
<div id="run_cronjobs" style="visibility:hidden;display:none;"><img alt="cron" src="/index.php?second=cronjobs&amp;p=e8j67bOn" width="1" height="1" /></div>
<script src="https://nguoicodonvn2008.info/assets/js/jquery/jquery.min.js"></script>
<script>var nv_base_siteurl="/",nv_lang_data="vi",nv_lang_interface="vi",nv_name_variable="nv",nv_fc_variable="op",nv_lang_variable="language",nv_module_name="news",nv_func_name="savefile",nv_is_user=0, nv_my_ofs=-4,nv_my_abbr="EDT",nv_cookie_prefix="nv4c_e856T",nv_check_pass_mstime=1738000,nv_area_admin=0,nv_safemode=0,theme_responsive=0,nv_recaptcha_ver=2,nv_recaptcha_sitekey="",nv_recaptcha_type="image",XSSsanitize=1;</script>
<script src="https://nguoicodonvn2008.info/assets/js/language/vi.js"></script>
<script src="https://nguoicodonvn2008.info/assets/js/DOMPurify/purify3.js"></script>
<script src="https://nguoicodonvn2008.info/assets/js/global.js"></script>
<script src="https://nguoicodonvn2008.info/assets/js/site.js"></script>
<script src="https://nguoicodonvn2008.info/themes/default/js/news.js"></script>
<script src="https://nguoicodonvn2008.info/themes/default/js/main.js"></script>
<script src="https://nguoicodonvn2008.info/themes/default/js/custom.js"></script>
<script type="application/ld+json">
        {
            "@context": "https://schema.org",
            "@type": "Organization",
            "url": "https://nguoicodonvn2008.info",
            "logo": "https://nguoicodonvn2008.info/uploads/angel.gif"
        }
        </script>
<script src="https://nguoicodonvn2008.info/themes/default/js/bootstrap.min.js"></script>
<script type="text/javascript">
var $scrolltop = $('.car-top');
$scrolltop.on('click', function () {
    $('html,body').animate({
        scrollTop: 0
    }, 800);
    $(this).addClass("car-run");
    setTimeout(function(){ $scrolltop.removeClass('car-run');}, 1000);
    return false;
});
$(window).on('scroll', function ()
{ 
    if($(window).scrollTop() >= 200)
    {
        $scrolltop.addClass("show");
        $scrolltop.addClass("car-down");
    }
    else
    {
       $scrolltop.removeClass("show");
       setTimeout(function(){ $scrolltop.removeClass('car-down');}, 300);
    }
});
</script>
</body>
</html>