Lesson 9: Managing Devices Flashcards

1
Q

What folder is the hardware mapped to?

A

in the /dev folder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the udev service do?

A

service udev identifies the attached hardware, sticks a name to it and maps to the /dev folder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you override a devices assigned name?

A

rules.d which contains rules that override udev naming convention, you can find udev configuration in /etc/udev. For override settings to take place you can reboot system, unplug and plug back in the device or force udev to update and reapply rules – use the utility “udevadm control –reload-rules” then udevadm trigger

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How would you confirm that the system detected hardware properly?

A

When hardware is detected it will be present in the /sys folder (a virtual folder).

In /sys/dev you’ll see block (drivers) and char (tape)

In /sys/devices you’ll see additional devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How would you list specify hardware such as all pci devices?

A

You can simple do ls{device_type}

lspci which will list all pci devices
lsusb to list all usb devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How will dmesg help you troubleshoot hardware not being detected ?

A

will show you a log of loaded hardware from boot

dmesg {pipe} {less}

timestamp = the number of seconds since the kernel loaded

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How would you watch the system for any real time hardware changes?

A

Use the command

dmesg –follow OR dmesg -w

udevadm monitoring

dmidecode

note. to add to a text file try dmidecode > -/file_name.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is CUPS?

A

CUPS is a print management system for Linux that enables a computer to function as aprint server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you install CUPS?

A

Install cups -> yum list cups
-> systemectl enable –now cups
to verify status -> systemctl status cups

note. CUPS install a web interface. Navigate to locale host @ 127.0.0.1:631

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you add printers ?

A

You can add printer from the CUPS web interface

note. CUPS install a web interface. Navigate to locale host @ 127.0.0.1:631 lpadmin -h localhost -p {printer name} -E (to enable) -v socket://{IP_address} -P {ppd_file_path}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you print?

A

lp -d {printer_name} {file_to_print} OR lpr print

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you check the status of a print job?

A

lpstat -p {printer_name} OR lpq

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How to set a default printer?

A

LPDEST={printer_name}

test. echo $LPDEST

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the lpr command?

A

The lpr command submits files for printing. The syntax of the lpr command is lpr [options] [file names]

  • E Force encryption when connecting to the server.
  • P {destination} Send the print job to the destination printer specified.
  • # {copies} Set the number of copies to print from 1 to 100.
  • T {name} Set the job name.
  • l Specify that the print file is already formatted and should be sent to the destination without being filtered.
  • o {option} Set a job option, like printing in landscape mode, scaling the printed output, printing double-sided, etc. Job optionsvary depending on the printer.
  • p Print the specified files with a shaded header that includesthe date, time, job name, and page number.
  • r Specify that the printed files should be deleted afterprinting.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do you cancel a print job

A

cancel {print_job_ID} OR lprm {print_job_ID}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is GPIO?

A

General-purpose input/output (GPIO) refers to pins on a circuit board that have nodesignated purpose, but are controllable by the user at runtime.

17
Q

What is the Isdev command?

A

The lsdev command displays various information about a system’s hardware asreported by the kernel. It compiles this information from three files in the /proc/directory:

/interrupts

/ioports

/dma

18
Q

System logs that record a “Machine Check Exception” error message usually indicate what type of issue?

A

An issue with RAM. The mcelog command can retrieve and print these error messages for easier analysis.

note. To confirm RAM module failure, you can use utilities like MemTest, MemTest86+, andmemtester to perform a stress test on all RAM modules for several hours, reportingany errors that are encountered.

19
Q

What command lists each detected hardware component on the system and provides details about each device?

A

The lshw command, the syntax of the lshw command is lshw [options]

20
Q

What does the dmidecode command do?

A

The dmidecode command dumps the system’s Desktop Management Interface(DMI) table and presents it in a human-readable format. The syntax of the dmidecode command is dmidecode [options]