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
  • Наука та технологія

КОМЕНТАРІ • 50

  • @jaqian
    @jaqian 10 місяців тому +8

    3:35 lsusb
    7:10 lspci
    9:46 lshw
    10:10 sudo !!
    14:12 lscpu
    14:58 lsblk

  • @jrommeke
    @jrommeke 10 місяців тому +5

    Just donated, hoping you will be able to maintain this very informative channel for many years to come. 👍

  • @jortmungandr1112
    @jortmungandr1112 10 місяців тому +4

    was looking for some quick refresher content to have with my coffee, this was perfect. thanks for keeping the series going! :)

  • @EroFelipe
    @EroFelipe 10 місяців тому +3

    I really enjoy these kind of videos! keep the good work.

  • @manum8170
    @manum8170 10 місяців тому +1

    This was some cool stuff. I wasn't aware of "short" addition to lshw command, thx

  • @innesleroux9439
    @innesleroux9439 10 місяців тому +1

    Best tip for me today was ALT in Firefox!!! Thanks as always for great content.

  • @Prophes0r
    @Prophes0r 10 місяців тому +3

    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

  • @russghound
    @russghound 4 місяці тому

    Very helpful info! I'm learning alot about running a Linux system through your videos.

  • @jpcoll2011
    @jpcoll2011 10 місяців тому

    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.

  • @cherrymountains72
    @cherrymountains72 10 місяців тому +4

    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!

  • @noam65
    @noam65 10 місяців тому

    As always, well done.

  • @theshowmanuk
    @theshowmanuk 10 місяців тому

    Great video. Thanks again.

  • @teddy741
    @teddy741 10 місяців тому

    Thanks! Nice tips!

  • @Wandering_Horse
    @Wandering_Horse 10 місяців тому

    I totally had forgotten about the !! shortcut. Thanks.

  • @Linux4thePeople
    @Linux4thePeople 10 місяців тому

    Great content!

  • @kychemclass5850
    @kychemclass5850 10 місяців тому

    I love your tutorials Jay. Tq.

  • @jonathanchevallier7046
    @jonathanchevallier7046 10 місяців тому

    Great video. Thank you Jay ;-)

  • @haxwithaxe
    @haxwithaxe 10 місяців тому +10

    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.

  • @sussusamogus7831
    @sussusamogus7831 10 місяців тому

    great video Jay

  • @Joey_Tai
    @Joey_Tai 2 місяці тому

    Great video. Thank you:-)

  • @heysourin
    @heysourin 10 місяців тому

    Thank you!

  • @Myektaie
    @Myektaie 10 місяців тому +1

    Thanks!

    • @Myektaie
      @Myektaie 10 місяців тому +1

      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!!!

  • @MorrWorm8
    @MorrWorm8 10 місяців тому

    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?

  • @Little-bird-told-me
    @Little-bird-told-me 10 місяців тому

    Can you tell me how do you get those highlights around the border of your terminal. Is that a gnome extension ?

  • @petevenuti7355
    @petevenuti7355 10 місяців тому

    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?

  • @petevenuti7355
    @petevenuti7355 10 місяців тому

    How do I edit a flash card's firmware to remap, say, a SanDisk card to have more spare memory cells and less capacity?

  • @tonypa9338
    @tonypa9338 10 місяців тому +2

    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

  • @petevenuti7355
    @petevenuti7355 10 місяців тому

    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.

  • @GrindAlchemyTech
    @GrindAlchemyTech 10 місяців тому

    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

    • @dingokidneys
      @dingokidneys 10 місяців тому +1

      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.

  • @dhollier
    @dhollier 10 місяців тому +1

    @learn Linux tv. Hey Jay, do you have a recommendation for a desktop and laptop the is optimized to run Linux?

    • @dingokidneys
      @dingokidneys 10 місяців тому +1

      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.

  • @DV-ml4fm
    @DV-ml4fm 10 місяців тому +1

    There is also dmidecode.

  • @ebusdk
    @ebusdk 10 місяців тому

    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.

  • @empanada223
    @empanada223 8 місяців тому

    (blinks)...today I learned that Firefox has a file menu...thank you... (writes down 'Alt')...

  • @jan5504
    @jan5504 10 місяців тому

    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

  • @noelvaillant7626
    @noelvaillant7626 10 місяців тому

    This is why I don't want to use snap: it messes up the output of lsblk : (

    • @dingokidneys
      @dingokidneys 10 місяців тому +1

      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.

  • @ryanswatson
    @ryanswatson 10 місяців тому +1

    Hi

  • @christenorio9555
    @christenorio9555 10 місяців тому

    Systemd error log will be much easier to translate in HTML

    • @jeremiahbullfrog9288
      @jeremiahbullfrog9288 10 місяців тому

      can you expand on this, i have no idea how to use this information

    • @christenorio9555
      @christenorio9555 10 місяців тому

      @@jeremiahbullfrog9288 for the steam Deck for identification of the crash report in incompatible in game crash report will being human readable fallout new Vegas

  • @nagag4739
    @nagag4739 10 місяців тому +1

    First comment🎉

  • @brissance
    @brissance 10 місяців тому

    why server people in general linux people are so boring, yeah linux , freebsd are all boring people, no fun no taste.

  • @sveu3pm
    @sveu3pm 10 місяців тому +1

    ubuntu snap crap