/proc/
and /sys/
virtual filesystems. Several tools summarize those details. Among them, lspci
(in the pciutils package) lists PCI devices, lsusb
(in the usbutils package) lists USB devices, and lspcmcia
(in the pcmciautils package) lists PCMCIA cards. These tools are very useful for identifying the exact model of a device. This identification also allows more precise searches on the web, which in turn, lead to more relevant documents.
Exempel B.1. Exempel på information som tillhandahålls av lspci
och lsusb
$
lspci
[...] 00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Root Complex 00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Starship/Matisse IOMMU 00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge 00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge 00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge [..] 02:09.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43ea 05:00.0 PCI bridge: ASPEED Technology, Inc. AST1150 PCI-to-PCI Bridge (rev 04) 06:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 41) 07:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03) 08:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller PM9A1/PM9A3/980PRO 09:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller PM9A1/PM9A3/980PRO 0a:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Function 0b:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP 0b:00.1 Encryption controller: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Cryptographic Coprocessor PSPCPP 0b:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller $
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub Bus 001 Device 003: ID 048d:c102 Integrated Technology Express, Inc. ITE Device(8910) Bus 001 Device 004: ID 5986:115f Bison Electronics Inc. Integrated Camera Bus 001 Device 005: ID 048d:c975 Integrated Technology Express, Inc. ITE Device(8295) Bus 001 Device 006: ID 8087:0026 Intel Corp. AX201 Bluetooth Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 002: ID 05e3:0620 Genesys Logic, Inc. GL3523 Hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
-v
som listar ännu mer detaljerad information (som vanligen inte behövs). Avslutningsvis listar kommandot lsdev
(i paketet procinfo) kommunikationsresurser som används av enheter.
/dev/
(see sidebar TILLBAKA TILL GRUNDERNA Enhetsåtkomstbehörigheter). These are special files that represent disk drives (for instance, /dev/hda
and /dev/sdc
), /dev/nvme1n1
partitions (/dev/hda1
or /dev/sdc3
or /dev/nvme1n1p2
), mice (/dev/input/mouse0
), keyboards (/dev/input/event0
), soundcards (/dev/snd/*
), serial ports (/dev/ttyS*
), and so on.
/
. Denna katalog kan innehålla namngivna underkataloger. Till exempel är home
en underkatalog till /
som kallas /home/
. Denna underkatalog kan i sin tur innehålla andra underkataloger, o.s.v. Varje katalog kan också innehålla filer, i vilka faktisk data kommer att lagras. Således refererar namnet /home/rmas/Skrivbord/hej.txt
till en fil med namnet hej.txt
lagrad i underkatalogen Skrivbord
i underkatalogen rmas
i katalogen home
som finns i roten. Kärnan översätter mellan detta namngivningssystem och den riktiga fysiska lagringsplatsen på disk.
mount
(montera)); dess andra diskar är sedan tillgängliga under dessa ”monteringspunkter”. Detta tillåter lagring av användares hemkataloger (vanligtvis lagrade i /home/
) på en annan hårddisk, vilken kommer att innehålla katalogerna rhertzog
och rmas
. När disken är monterad på /home/
kommer dessa kataloger att kunna nås på deras vanliga platser, och sökvägar så som /home/rmas/Skrivbord/hej.txt
kommer att fortsätta fungera.
mkfs.ext4
(where mkfs
stands for MaKe FileSystem) handle formatting. These commands require, as a parameter, a device file representing the partition to be formatted (for instance, /dev/sda1
). This operation is destructive and should only be run once, except if one deliberately wishes to wipe a filesystem and start afresh.