');display:flex;inset:0;justify-content:center;position:absolute}.copy-to-clipboard-button[data-copy-state=copy-success]:before{content:url('data:image/svg+xml;utf8,')}.kg-bookmark-card figcaption,.kg-gallery-card figcaption,.kg-image-card figcaption,.kg-video-card figcaption{padding-top:2px;text-align:center;--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.kg-bookmark-card figcaption:is(.dark *),.kg-gallery-card figcaption:is(.dark *),.kg-image-card figcaption:is(.dark *),.kg-video-card figcaption:is(.dark *){--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.kg-code-card figcaption{padding-top:2px;text-align:center;--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.kg-code-card figcaption:is(.dark *){--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity,1))}.toc{overflow-y:auto}.toc>.toc-list{overflow:hidden;position:relative}.toc>.toc-list li{list-style:none}.js-toc{overflow-y:hidden}.toc-list{margin:0;padding-left:1.5rem}a.toc-link{color:currentColor;height:100%}.is-collapsible{max-height:1000px;overflow:hidden;transition:all .3s ease-in-out}.is-collapsed{max-height:0}.is-position-fixed{position:fixed!important;top:0}.is-active-link{font-weight:700}.toc-link:before{background-color:#eee;content:" ";display:inline-block;height:inherit;left:0;margin-top:-1px;position:absolute;width:2px}.is-active-link:before{background-color:#54bc4b}.toc-list-item{font-size:.95rem;margin-bottom:.5rem}.toc-link{border-radius:.25rem;color:#333;display:block;padding:.25rem .5rem;text-decoration:none;transition:color .2s ease}.toc-link:hover{background-color:#f3f4f6;color:#1e40af}.toc-link.is-active-link{background-color:#e0e7ff;color:#1e40af;font-weight:600}.toc-link.node-name--H2{font-size:1rem}.content img[width="20"],.content img[width="25"]{display:inline;margin-left:.25rem;margin-right:.25rem}.content table td[colspan="2"]{text-align:center}.content table td img{margin:auto}.first-letter\:uppercase:first-letter{text-transform:uppercase}.hover\:border-blue-400:hover{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity,1))}.hover\:border-secondary-300:hover{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity,1))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.hover\:bg-primary-100:hover{--tw-bg-opacity:1;background-color:rgb(224 242 254/var(--tw-bg-opacity,1))}.hover\:bg-primary-200:hover{--tw-bg-opacity:1;background-color:rgb(186 230 253/var(--tw-bg-opacity,1))}.hover\:bg-primary-50:hover{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.hover\:bg-primary-50\/80:hover{background-color:rgba(240,249,255,.8)}.hover\:bg-primary-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\:bg-red-100:hover{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.hover\:bg-secondary-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\:from-blue-600:hover{--tw-gradient-from:#2563eb var(--tw-gradient-from-position);--tw-gradient-to:rgba(37,99,235,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.hover\:to-blue-700:hover{--tw-gradient-to:#1d4ed8 var(--tw-gradient-to-position)}.hover\:text-accent-600:hover{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity,1))}.hover\:text-gray-400:hover{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.hover\:text-green-600:hover{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.hover\:text-primary-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.hover\:text-primary-700:hover{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.hover\:text-secondary-700:hover{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity,1))}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:border-transparent:focus{border-color:transparent}.focus\:bg-primary-50:focus{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity,1))}.focus\:text-primary-600:focus{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.focus\:ring-gray-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity,1))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.group:focus-within .group-focus-within\:opacity-100{opacity:1}.group:hover .group-hover\:visible,.group\/level2:hover .group-hover\/level2\:visible{visibility:visible}.group:hover .group-hover\:block{display:block}.group\/item:hover .group-hover\/item\:translate-x-1{--tw-translate-x:0.25rem}.group\/item:hover .group-hover\/item\:translate-x-1,.group\/level2:hover .group-hover\/level2\:translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group\/level2:hover .group-hover\/level2\:translate-x-0{--tw-translate-x:0px}.group\/level2:hover .group-hover\/level2\:translate-x-1{--tw-translate-x:0.25rem}.group:hover .group-hover\:-translate-x-1,.group\/level2:hover .group-hover\/level2\:translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:-translate-x-1{--tw-translate-x:-0.25rem}.group:hover .group-hover\:translate-x-1{--tw-translate-x:0.25rem}.group:hover .group-hover\:rotate-180,.group:hover .group-hover\:translate-x-1{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:rotate-180{--tw-rotate:180deg}.group\/bookmark:hover .group-hover\/bookmark\:fill-current,.group\/comment:hover .group-hover\/comment\:fill-current,.group\/like:hover .group-hover\/like\:fill-current{fill:currentColor}.group:hover .group-hover\:fill-black\/75{fill:rgba(0,0,0,.75)}.group:hover .group-hover\:fill-current{fill:currentColor}.group:hover .group-hover\:text-primary-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity,1))}.group:hover .group-hover\:opacity-100,.group\/level2:hover .group-hover\/level2\:opacity-100{opacity:1}.dark\:border-primary-400:is(.dark *){--tw-border-opacity:1;border-color:rgb(56 189 248/var(--tw-border-opacity,1))}.dark\:border-secondary-200:is(.dark *){--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity,1))}.dark\:border-secondary-600:is(.dark *){--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.dark\:border-secondary-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity,1))}.dark\:bg-blue-900\/20:is(.dark *){background-color:rgba(30,58,138,.2)}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\:bg-gray-800\/95:is(.dark *){background-color:rgba(31,41,55,.95)}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity,1))}.dark\:bg-gray-900\/80:is(.dark *){background-color:rgba(17,24,39,.8)}.dark\:bg-primary-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity,1))}.dark\:bg-secondary-700:is(.dark *){--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.dark\:bg-secondary-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity,1))}.dark\:bg-secondary-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity,1))}.dark\:bg-slate-400:is(.dark *){--tw-bg-opacity:1;background-color:rgb(148 163 184/var(--tw-bg-opacity,1))}.dark\:fill-white\/60:is(.dark *){fill:hsla(0,0%,100%,.6)}.dark\:fill-white\/70:is(.dark *){fill:hsla(0,0%,100%,.7)}.dark\:stroke-white\/60:is(.dark *){stroke:hsla(0,0%,100%,.6)}.dark\:text-\[rgba\(255\2c 255\2c 255\2c 0\.5\)\]:is(.dark *){color:hsla(0,0%,100%,.5)}.dark\:text-blue-400:is(.dark *){--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity,1))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.dark\:text-primary-400:is(.dark *){--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.dark\:text-secondary-100:is(.dark *){--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity,1))}.dark\:text-secondary-300:is(.dark *){--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.dark\:text-secondary-400:is(.dark *){--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity,1))}.dark\:text-secondary-600:is(.dark *){--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity,1))}.dark\:text-slate-200:is(.dark *){--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity,1))}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.dark\:shadow-gray-800\/50:is(.dark *){--tw-shadow-color:rgba(31,41,55,.5);--tw-shadow:var(--tw-shadow-colored)}.dark\:shadow-gray-900\/50:is(.dark *){--tw-shadow-color:rgba(17,24,39,.5);--tw-shadow:var(--tw-shadow-colored)}.dark\:ring-gray-700:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(55 65 81/var(--tw-ring-opacity,1))}.dark\:ring-secondary-600:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(71 85 105/var(--tw-ring-opacity,1))}.dark\:hover\:border-secondary-600:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity,1))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\:hover\:bg-gray-700\/80:hover:is(.dark *){background-color:rgba(55,65,81,.8)}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\:hover\:bg-secondary-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity,1))}.dark\:hover\:text-accent-400:hover:is(.dark *){--tw-text-opacity:1;color:rgb(251 191 36/var(--tw-text-opacity,1))}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.dark\:hover\:text-green-400:hover:is(.dark *){--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.dark\:hover\:text-primary-300:hover:is(.dark *){--tw-text-opacity:1;color:rgb(125 211 252/var(--tw-text-opacity,1))}.dark\:hover\:text-primary-400:hover:is(.dark *){--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.dark\:hover\:text-secondary-300:hover:is(.dark *){--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity,1))}.dark\:focus\:bg-gray-700:focus:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.dark\:focus\:bg-gray-800:focus:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity,1))}.dark\:focus\:text-primary-400:focus:is(.dark *){--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}.dark\:focus\:ring-offset-gray-800:focus:is(.dark *){--tw-ring-offset-color:#1f2937}.dark\:focus\:ring-offset-gray-900:focus:is(.dark *){--tw-ring-offset-color:#111827}.dark\:focus\:ring-offset-secondary-800:focus:is(.dark *){--tw-ring-offset-color:#1e293b}.dark\:focus\:ring-offset-secondary-900:focus:is(.dark *){--tw-ring-offset-color:#0f172a}.group:hover .dark\:group-hover\:fill-white\/75:is(.dark *){fill:hsla(0,0%,100%,.75)}.group:hover .dark\:group-hover\:text-primary-400:is(.dark *){--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity,1))}@media (min-width:640px){.sm\:col-span-1{grid-column:span 1/span 1}.sm\:mx-1{margin-left:.25rem;margin-right:.25rem}.sm\:mx-2{margin-left:.5rem;margin-right:.5rem}.sm\:inline{display:inline}.sm\:max-w-screen-sm{max-width:640px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:p-8{padding:2rem}.sm\:px-5{padding-left:1.25rem;padding-right:1.25rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:py-10{padding-bottom:2.5rem;padding-top:2.5rem}.sm\:py-3{padding-bottom:.75rem;padding-top:.75rem}}@media (min-width:768px){.md\:col-span-1{grid-column:span 1/span 1}.md\:h-96{height:24rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}}@media (min-width:1024px){.lg\:invisible{visibility:hidden}.lg\:absolute{position:absolute}.lg\:left-0{left:0}.lg\:col-span-1{grid-column:span 1/span 1}.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:row-span-3{grid-row:span 3/span 3}.lg\:row-span-4{grid-row:span 4/span 4}.lg\:row-span-6{grid-row:span 6/span 6}.lg\:mt-2{margin-top:.5rem}.lg\:block{display:block}.lg\:inline{display:inline}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-\[496px\]{height:496px}.lg\:w-48{width:12rem}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-\[auto_1fr_auto\]{grid-template-columns:auto 1fr auto}.lg\:flex-row{flex-direction:row}.lg\:items-center{align-items:center}.lg\:gap-2{gap:.5rem}.lg\:rounded-lg{border-radius:.5rem}.lg\:p-6{padding:1.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-2{padding-bottom:.5rem;padding-top:.5rem}.lg\:pl-0{padding-left:0}.lg\:text-3xl{font-size:1.875rem;line-height:2.25rem}.lg\:text-5xl{font-size:3rem;line-height:1}.lg\:opacity-0{opacity:0}.lg\:shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.lg\:ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.lg\:ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity,1))}.lg\:ring-opacity-5{--tw-ring-opacity:0.05}.group:focus-within .lg\:group-focus-within\:visible{visibility:visible}.group:hover .lg\:group-hover\:visible{visibility:visible}.group:hover .lg\:group-hover\:opacity-100{opacity:1}.dark\:lg\:shadow-gray-900\/50:is(.dark *){--tw-shadow-color:rgba(17,24,39,.5);--tw-shadow:var(--tw-shadow-colored)}.dark\:lg\:ring-gray-700:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(55 65 81/var(--tw-ring-opacity,1))}}.gh-post-upgrade-cta{align-items:center;color:#fff;display:flex;flex-direction:column;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-size:16px;text-align:center;width:100%}.gh-post-upgrade-cta-content{border-radius:8px;padding:40px 4vw}.gh-post-upgrade-cta h2{color:#fff;font-size:28px;letter-spacing:-.2px;margin:0;padding:0}.gh-post-upgrade-cta p{margin:20px 0 0;padding:0}.gh-post-upgrade-cta small{font-size:16px;letter-spacing:-.2px}.gh-post-upgrade-cta a{cursor:pointer;font-weight:500}.gh-post-upgrade-cta a,.gh-post-upgrade-cta a:hover{box-shadow:none;color:#fff;text-decoration:underline}.gh-post-upgrade-cta a:hover{opacity:.8}.gh-post-upgrade-cta a.gh-btn{background:#fff;border-radius:4px;display:block;font-size:16px;font-weight:600;margin:28px 0 0;padding:8px 18px;text-decoration:none}.gh-post-upgrade-cta a.gh-btn:hover{opacity:.92}#search.loading{pointer-events:none}#search.loading i,#search.loading span,#search.loading svg{opacity:0;visibility:hidden}#search.loading:before{animation:search-loading-spin .8s linear infinite;border:3px solid rgba(0,0,0,.1);border-radius:50%;border-top-color:currentcolor;height:20px;margin:-10px 0 0 -10px;width:20px;z-index:1}#search.loading:after,#search.loading:before{content:"";left:50%;position:absolute;top:50%}#search.loading:after{animation:search-loading-pulse 1.5s ease-in-out infinite;background:rgba(0,0,0,.05);border-radius:50%;height:32px;margin:-16px 0 0 -16px;width:32px}@keyframes search-loading-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes search-loading-pulse{0%,to{opacity:.5;transform:scale(.8)}50%{opacity:.8;transform:scale(1.2)}}
如何在 Ubuntu Linux 查看网卡的详细信息如果你想在 Ubuntu 或者其他的 Linux 发行版,查找操作系统中使用的网卡(网络适配器)。在 Linux ,很容易找到计算机中网络适配器的制造商。
你只需要在你的 Linux 发行版中安装 lshw 命令,lshw
命令是 List Hardware的缩写是 Linux 一个强大的命令行工具,用于提取计算机的硬件配置的详细信息。
它提供关于各种硬件组件的全面信息,包括CPU、内存、磁盘、网络接口等。下面是使用 lshw
查看网络适配器的方法。
lshw 命令查看网卡
使用快捷键 ctrl+alt+t
打开终端并运行命令 sudo lshw -C network
,该命令将会所有网卡的信息,其中包括制造商与型号:
sudo apt install lshw -y
sudo lshw -C network

如果 lshw
命令无法与 sudo 配合使用,请不要使用超级用户权限运行。这也许有点帮助。该命令的输出如下所示:
*-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:04:00.0
logical name: enp4s0
version: 1b
serial: 88:ae:dd:59:60:9d
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=5.15.0-107-generic duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.70.91 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:18 ioport:3000(size=256) memory:4f804000-4f804fff memory:4f800000-4f803fff
如你所见,我的计算机的网卡(网络适配器)是 Realtek RTL8111/8168/8411,这是一个瑞昱网卡,因商标的关系,部分电脑用户将其称为“螃蟹卡”。。
lshw
命令实际上可用于列出任何 Linux 的硬件信息,因此命令名为 lshw
。这里使用 network
选项,它会过滤仅显示网络硬件的结果。
lspci 查看网卡
或者,您可以使用 lspci 命令来显示系统 PCI 总线的信息。您不需要 root
用户权限即可运行 lspci 命令。只需在终端中输入 lspci
命令即可:
lspci
、
00:00.0 Host bridge: Intel Corporation Device 4668 (rev 02)
00:01.0 PCI bridge: Intel Corporation Device 460d (rev 02)
00:02.0 Display controller: Intel Corporation Device 4680 (rev 0c)
00:08.0 System peripheral: Intel Corporation Device 464f (rev 02)
00:0a.0 Signal processing controller: Intel Corporation Device 467d (rev 01)
00:14.0 USB controller: Intel Corporation Device 7ae0 (rev 11)
00:14.2 RAM memory: Intel Corporation Device 7aa7 (rev 11)
00:15.0 Serial bus controller [0c80]: Intel Corporation Device 7acc (rev 11)
00:15.1 Serial bus controller [0c80]: Intel Corporation Device 7acd (rev 11)
00:15.3 Serial bus controller [0c80]: Intel Corporation Device 7acf (rev 11)
00:16.0 Communication controller: Intel Corporation Device 7ae8 (rev 11)
00:17.0 SATA controller: Intel Corporation Device 7ae2 (rev 11)
00:19.0 Serial bus controller [0c80]: Intel Corporation Device 7afc (rev 11)
00:19.1 Serial bus controller [0c80]: Intel Corporation Device 7afd (rev 11)
00:1a.0 PCI bridge: Intel Corporation Device 7ac8 (rev 11)
00:1c.0 PCI bridge: Intel Corporation Device 7ab9 (rev 11)
00:1c.2 PCI bridge: Intel Corporation Device 7aba (rev 11)
00:1e.0 Communication controller: Intel Corporation Device 7aa8 (rev 11)
00:1e.3 Serial bus controller [0c80]: Intel Corporation Device 7aab (rev 11)
00:1f.0 ISA bridge: Intel Corporation Device 7a86 (rev 11)
00:1f.3 Audio device: Intel Corporation Device 7ad0 (rev 11)
00:1f.4 SMBus: Intel Corporation Device 7aa3 (rev 11)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Device 7aa4 (rev 11)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] (rev c7)
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X]
02:00.0 Non-Volatile memory controller: Phison Electronics Corporation E12 NVMe Controller (rev 01)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 1b)
结论
要在 Ubuntu Linux 查看网卡的信息,你可以使用 lshw
或者 lspci
命令查看,lshw
是系统管理员和需要详细硬件信息的用户的一个重要工具,可用于故障排除、系统管理或系统优化。
它提供广泛的详细信息和支持多种输出格式,使其在不同的使用场景中具有高度的灵活性。