Linux Crash Course - Easy Terminal Commands for Inspecting Hardware
Вставка
- Опубліковано 31 лип 2024
- In the 60th episode of the Linux Crash Course series, you'll learn some easy-to-use commands you can use to inspect hardware. These commands will help you list PCI devices, view information about your CPU, and more!
Thanks to Akamai for sponsoring today's video.
• Set up your own cloud server with Akamai's Connected Cloud ➜ learnlinux.link/akamai
🎥 VIDEO SPECIFIC LINKS
• Check out Proxmox Virtual Environment ➜ www.proxmox.com/en/proxmox-vi...
• Proxmox Server Build List (Commission Earned) ➜ learnlinux.link/proxmox-build
• Check out the FULL COURSE on Proxmox ➜ linux.video/pve-course
Support Linux Learning (commission earned)
• Receive a 5% discount on an LPI exam voucher ➜ learnlinux.link/lpi-voucher
• Affiliate store for Linux compatible hardware/accessories ➜ learnlinux.link/amazon
• Become a channel member here on UA-cam ➜ learnlinux.link/join
• Become a Patron on Patreon ➜ learnlinux.link/patron
• Mastering Ubuntu Server 4th Edition ➜ ubuntuserverbook.com
• Set up your own cloud server with Akamai's Connected Cloud ➜ learnlinux.link/akamai
• Awesome KVM for your Homelab ➜ learnlinux.link/tinypilot
⏰ TIME CODES
00:00 - Intro
00:55 - Set up your own Linux Server on Akamai's connected cloud (sponsor)
02:14 -Ccommand line or GUI?
03:22 - Listing USB devices on Linux with the lsusb command
06:35 - How to show a "tree view" with the lsusb command
07:05 - Introducing the lspci command
09:37 - Using the lshw Command to list Hardware
11:19 - Generating an HTML report with the lshw command
13:27 - Producing a shorter report with lshw
14:06 - Viewing CPU info with the lscpu command
14:57 - Using the lsblk command to view block storage devices
Full Courses from Learn Linux TV
• Linux Crash Course series ➜ linux.video/cc
• Learn how to exit use tmux ➜ linux.video/tmux
• Learn how to use vim ➜ linux.video/vim
• Bash Scripting Series ➜ linux.video/bash
• Proxmox VE Cluster Full Course ➜ linux.video/pve
• Learn Ansible ➜ linux.video/ansible
🌐 LEARN LINUX TV ON THE WEB
• Main site ➜ www.learnlinux.tv
• Community ➜ community.learnlinux.tv
• Official Github Account ➜ github.com/LearnLinuxTV
• Enterprise Linux Security Podcast ➜ enterpriselinuxsecurity.show
• The Homelab Show Podcast ➜ thehomelab.show
• Jay on Udemy ➜ www.udemy.com/user/jay-lacroix-3
• Jay on Twitter ➜ x.com/JayTheLinuxGuy
• Content Ethics ➜ www.learnlinux.tv/content-ethics
• Request Assistance ➜ www.learnlinux.tv/request-ass...
⚠️ DISCLAIMER
LearnLinuxTV produces technical content that will hopefully be helpful to you and teach you something new. However, this content is provided without any warranty (expressed or implied). LearnLinuxTV is not responsible for any damages that may arise from any use of the content and information that's being provided. The viewer is expected to follow best judgement and to make his/her/their best decisions while working with production or non-production software, systems and hardware.
#Linux #DevOps #linuxtutorial - Наука та технологія
3:35 lsusb
7:10 lspci
9:46 lshw
10:10 sudo !!
14:12 lscpu
14:58 lsblk
Just donated, hoping you will be able to maintain this very informative channel for many years to come. 👍
was looking for some quick refresher content to have with my coffee, this was perfect. thanks for keeping the series going! :)
I really enjoy these kind of videos! keep the good work.
This was some cool stuff. I wasn't aware of "short" addition to lshw command, thx
Best tip for me today was ALT in Firefox!!! Thanks as always for great content.
You went into some operators for most commands other than *lspci* .
It is worth quickly talking about:
-s
Which is the "select" operator. After you use the basic lspci command, you run it again with -s and the ##:##:... of the device you want more info of. Usually with the operator below. You can also use it with just the domain (first digits) or domain:bus to list all the devices that are part of that domain/bus.
-v (or -vv or -vvv but these usually have too much info to be useful.)
Which is for verbose output. You really only want to do this in combination with the -s command otherwise you will get absolutely flooded.
Why would you want to do this?
Let's say you want to know what version of PCIe a card says it can use?
It will also tell you what version of PCIe it is ACTUALLY using. Ex. a PCIe 4.0 card in a 3.0 slot.
It will show you how many lanes the card can use, and how many it is actually using which is useful because not all physical x16 slots actually have 16 lanes. Or, sometimes lanes get split between slots automatically, and this will show you how many are actually being used. Ex. a card can report itself as x16 but it might be using x8 lanes.
Finally, it will show you what driver and kernel modules are currently being used for the device. This can be SUPER useful while troubleshooting. Sometimes a device will still be using a default driver that you didn't even know was included after you install a specific driver.
Example: (with MANY lines removed to make this readable...)
# lspci -vv -s 05:00
05:00.0 Non-Volatile memory controller: Intel Corporation NVMe Optane Memory Series
Subsystem: Intel Corporation NVMe Optane Memory Series
...
IOMMU group: 33
...
Capabilities: [60] Express (v2) Endpoint, MSI 00
LnkCap: Port #0, Speed 8GT/s, Width x2, ASPM L1, Exit Latency L1 unlimited
...
LnkSta: Speed 5GT/s (downgraded), Width x1 (downgraded)
...
Kernel driver in use: nvme
Kernel modules: nvme
As we can see. This is an Intel Optane NVMe SSD.
This is a 16GiB M10 drive.
LnkCap - The drive reports it can use 8GT/s, which is PCIe 3.0 [1] , and x2 lanes which is consistent with the specifications.[2]
LnkSta - But we can see that it is CURRENTLY connected at 5GT/s, which is PCIe 2.0 [1] , and only using x1 lane.
We also see it is in IOMMU group 33, which is useful to know when passing devices through to a VM.
[1] en.wikipedia.org/wiki/PCI_Express#Comparison_table
[2] www.intel.com/content/www/us/en/products/sku/135581/intel-optane-memory-m10-series-16gb-m-2-80mm-pcie-3-0-20nm-3d-xpoint/specifications.html
Very helpful info! I'm learning alot about running a Linux system through your videos.
Many many thanks for your uploading of this video. I have just come back to Linux after a couple of years in the wilderness and have been a bit concerned about my nvme temperatures which have been a bit roasty especially under heavy work loads. I use the command
$ sudo nvme smart-log /dev/nvme0n1 but wanted a constant and up to date check between two short periods of time. The command
watch was just what I was looking for.
As always, very clear and concise. This may be beginner stuff but for somebody who doesn't daily drive a Linux machine, this is very helpful!
As always, well done.
Great video. Thanks again.
Thanks! Nice tips!
I totally had forgotten about the !! shortcut. Thanks.
Great content!
I love your tutorials Jay. Tq.
Great video. Thank you Jay ;-)
Even though I have been using Linux for my daily driver and in servers since 2006 I usually learn something new from most of your intro content. Even if it's not useful to me it's better than reading every man page start to finish (like I used to) and every once in a while I get to share one of those nuggets with someone who does need it.
great video Jay
Great video. Thank you:-)
Thank you!
Thanks!
Thanks Jay! This actually solved one of my problems: i wanted to make a script in which i call it and i want to backup my computers disks with dd command and store them in the appropriate folder for each computer. This solves the part where i wasn’t sure which folder to choose 🎉 thanks, your videos are always awesome! Great work!!!
Question, if I flash a OS on a sd card for the Pi it boots into the gui then after I update & upgrade it now boots into tty1 I can repeat this process over & over. What is happening?
Can you tell me how do you get those highlights around the border of your terminal. Is that a gnome extension ?
Well the flash card I had installed Debian on to follow along with you seems to have erased most of itself (no I didn't dd or del or anything, it was just a spontaneous freeze and when I reboot it was gone)
How do I edit the card's firmware to remap a SanDisk card to have more spare memory cells and less capacity?
How do I edit a flash card's firmware to remap, say, a SanDisk card to have more spare memory cells and less capacity?
Great information. I feel your videos are exceptionally good for explaining GNU/Linux for beginners. Thank you for spending the time to do so.
May ask a question, please? After using lshw and sending the output to an html file (sudo lshw -html > hwinfo.html), I opened the html file and noticed one hardware description (parallel controller, in this case) displayed red text. Could you explain what this means?
I apologize if this question has already been asked and I missed it.
Thanks again
I would like to install kerrighed since I have to start over from scratch, anybody have any ideas?, it's no longer there on the official site.
Great video as usual...hey maybe you can mention where these commands such as lsusb can be found tinycore & some other distro don't have a lot of the commands . I typically run into this when trying to follow instructors.....& end up in a nightmare hunting some of the commands down
Tinycore looks like it uses Busybox, as do Alpine Linux and some other tiny minimal systems. Consequently, some of these commands are considered 'bloat' by the people packaging these distros and you might have to install them yourself if you want them. Tinycore maintains its own package repository as do many other Linux systems so how you find the packages will depend on the distribution and the package manager used.
@learn Linux tv. Hey Jay, do you have a recommendation for a desktop and laptop the is optimized to run Linux?
I've noticed that Jay uses some System76 devices. However, if you're in Europe, Tuxedo Computers might be the way to go; I've seen them recommended by other Linux UA-camrs. More generally, Lenovo Thinkpads seem to be well thought of for Linux support and even Dell will sell you a machine with Linux on it and provide Linux support.
There is also dmidecode.
First of all; great videl - again :)
But... I signed up for Akamai (from scandinavia) with the same name/payment/cc as my AWS and Azure business account. Got declined and no reply from their support - not really the kind of support I was looking for.
(blinks)...today I learned that Firefox has a file menu...thank you... (writes down 'Alt')...
hello brother, I have a serious question, how do you make this linux expertise a career besides from UA-cam content? I'm really confused right now.. I love these videos btw
This is why I don't want to use snap: it messes up the output of lsblk : (
You could just set up an alias for lsblk that adds the -e|--exclude option. I think that "lsblk -e 7" would do the trick.
Hi
Systemd error log will be much easier to translate in HTML
can you expand on this, i have no idea how to use this information
@@jeremiahbullfrog9288 for the steam Deck for identification of the crash report in incompatible in game crash report will being human readable fallout new Vegas
First comment🎉
why server people in general linux people are so boring, yeah linux , freebsd are all boring people, no fun no taste.
to repel normies
ubuntu snap crap