Identificar Dispositius Connectats a Linux
Índex
- → 1. Introducció
- → 2. Capes del Sistema
- → 3. Comandes + La Meva Sortida
- → 4. Script Automàtic
- → 5. Evidències i Captures
1. Introducció
Aquesta documentació mostra només la línia de comanda i deixa un espai perquè hi posis la teva pròpia sortida de consola. Així pots comparar fàcilment les teves sortides reals.
2. Capes del Sistema Implicades
3. Comandes + La Meva Sortida
3.1 lsusb — Dispositius USB
Comanda:
$ lsusb
La meva sortida de consola:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 002: ID 0bda:8156 Realtek Semiconductor Corp. Lenovo 2.5G C to RJ45 Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 002: ID 06cb:00f9 Synaptics, Inc. Bus 003 Device 003: ID 5986:1177 Bison Electronics Inc. Integrated Camera Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
3.2 lspci — Dispositius PCI
Comanda:
$ lspci
La meva sortida de consola:
00:00.0 Host bridge: Intel Corporation 12th Gen Core Processor Host Bridge/DRAM Registers (rev 02) 00:02.0 VGA compatible controller: Intel Corporation Alder Lake-P GT2 [Iris Xe Graphics] (rev 0c) 00:04.0 Signal processing controller: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant (rev 02) 00:06.0 PCI bridge: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 (rev 02) 00:07.0 PCI bridge: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #0 (rev 02) 00:07.2 PCI bridge: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #2 (rev 02) 00:08.0 System peripheral: Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator (rev 02) 00:0a.0 Signal processing controller: Intel Corporation Platform Monitoring Technology (rev 01) 00:0d.0 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller (rev 02) 00:0d.2 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #0 (rev 02) 00:0d.3 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #1 (rev 02) 00:14.0 USB controller: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller (rev 01) 00:14.2 RAM memory: Intel Corporation Alder Lake PCH Shared SRAM (rev 01) 00:15.0 Serial bus controller: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 (rev 01) 00:16.0 Communication controller: Intel Corporation Alder Lake PCH HECI Controller (rev 01) 00:16.3 Serial controller: Intel Corporation Alder Lake AMT SOL Redirection (rev 01) 00:1c.0 PCI bridge: Intel Corporation Device 51b8 (rev 01) 00:1c.7 PCI bridge: Intel Corporation Alder Lake PCH-P PCI Express Root Port #9 (rev 01) 00:1f.0 ISA bridge: Intel Corporation Alder Lake PCH eSPI Controller (rev 01) 00:1f.3 Multimedia audio controller: Intel Corporation Alder Lake PCH-P High Definition Audio Controller (rev 01) 00:1f.4 SMBus: Intel Corporation Alder Lake PCH-P SMBus Host Controller (rev 01) 00:1f.5 Serial bus controller: Intel Corporation Alder Lake-P PCH SPI Controller (rev 01) 04:00.0 Non-Volatile memory controller: SK hynix Gold P31/BC711/PC711 NVMe Solid State Drive 0a:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5261 PCI Express Card Reader (rev 01)
3.3 lsblk — Discos i particions
Comanda:
$ lsblk -f
La meva sortida de consola:
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1
|-nvme0n1p1
| vfat FAT32 3929-51F3 504,8M 1% /boot/efi
`-nvme0n1p2
ext4 1.0 028267da-4080-4bb1-8d6b-f0bc5a677265 76G 62% /
3.4 lshw — Informació completa
Comanda:
$ sudo lshw -short
La meva sortida de consola:
H/W path Device Class Description
=======================================================
system Computer
/0 bus Motherboard
/0/0 memory 31GiB System memory
/0/1 processor 12th Gen Intel(R) Core(TM) i7-12800H
/0/100 bridge 12th Gen Core Processor Host Bridge/
/0/100/2 /dev/fb0 display Alder Lake-P GT2 [Iris Xe Graphics]
/0/100/4 generic Alder Lake Innovation Platform Frame
/0/100/6 bridge 12th Gen Core Processor PCI Express
/0/100/6/0 /dev/nvme0 storage SKHynix_HFS256GDE9X081N
/0/100/6/0/0 hwmon3 disk NVMe disk
/0/100/6/0/2 /dev/ng0n1 disk NVMe disk
/0/100/6/0/1 /dev/nvme0n1 disk NVMe disk
/0/100/7 bridge Alder Lake-P Thunderbolt 4 PCI Expre
/0/100/7.2 bridge Alder Lake-P Thunderbolt 4 PCI Expre
/0/100/8 generic 12th Gen Core Processor Gaussian & N
/0/100/a generic Platform Monitoring Technology
/0/100/d bus Alder Lake-P Thunderbolt 4 USB Contr
/0/100/d.2 bus Alder Lake-P Thunderbolt 4 NHI #0
/0/100/d.3 bus Alder Lake-P Thunderbolt 4 NHI #1
/0/100/14 bus Alder Lake PCH USB 3.2 xHCI Host Con
/0/100/14.2 memory RAM memory
/0/100/15 bus Alder Lake PCH Serial IO I2C Control
/0/100/16 communication Alder Lake PCH HECI Controller
/0/100/16.3 communication Alder Lake AMT SOL Redirection
/0/100/1c bridge Intel Corporation
/0/100/1c.7 bridge Alder Lake PCH-P PCI Express Root Po
/0/100/1c.7/0 mmc0 bus RTS5261 PCI Express Card Reader
/0/100/1f bridge Alder Lake PCH eSPI Controller
/0/100/1f/0 system PnP device PNP0c02
/0/100/1f/1 system PnP device PNP0c02
/0/100/1f/2 generic PnP device LEN0071
/0/100/1f/3 generic PnP device LEN0307
/0/100/1f/4 system PnP device PNP0c02
/0/100/1f/5 system PnP device PNP0c02
/0/100/1f/6 system PnP device PNP0c02
/0/100/1f/7 system PnP device PNP0c02
/0/100/1f/8 system PnP device PNP0c01
/0/100/1f.3 card0 multimedia Alder Lake PCH-P High Definition Aud
/0/100/1f.4 bus Alder Lake PCH-P SMBus Host Controll
/0/100/1f.5 bus Alder Lake-P PCH SPI Controller
/1 input0 input Sleep Button
/2 input1 input Lid Switch
/3 input11 input ELAN0686:00 04F3:320D Touchpad
/4 input12 input ThinkPad Extra Buttons
/5 input13 input Video Bus
/6 input14 input sof-hda-dsp Mic
/7 input15 input sof-hda-dsp Headphone
/8 input16 input sof-hda-dsp HDMI/DP,pcm=3
/9 input17 input sof-hda-dsp HDMI/DP,pcm=4
/a input18 input sof-hda-dsp HDMI/DP,pcm=5
/b input2 input Power Button
/c input3 input AT Translated Set 2 keyboard
/d input5 input TPPS/2 Elan TrackPoint
/e input9 input ELAN0686:00 04F3:320D Mouse
/f eth0 network Ethernet interface
3.5 ip link — Interfícies de xarxa
Comanda:
$ ip link show
La meva sortida de consola:
1: lo:mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether 60:7d:09:0d:f1:44 brd ff:ff:ff:ff:ff:ff
4. Script de Diagnòstic Automàtic
#!/bin/bash
echo "=== DIAGNÒSTIC DISPOSITIUS $(date) ===" > informe-$(date +%F).txt
lsusb >> informe-$(date +%F).txt
lspci >> informe-$(date +%F).txt
lsblk -f >> informe-$(date +%F).txt
sudo lshw -short >> informe-$(date +%F).txt
echo "✅ Informe generat!"