To find the name of a DVD, CD-ROM, or Blu-ray writer device on a Linux system, you can use the lsblk
command. This command lists the block devices on the system, including storage devices such as hard disks, SSDs, and optical drives.
To use lsblk
, you can run the following command:
lsblk
This will output a list of block devices on the system, with each line showing the device name, type, size, and other information. You can then look for devices with the "rom" or "sr" type, which indicate DVD and CD-ROM drives, respectively. Blu-ray drives may be listed as "bd" or "sr1" type devices.
Alternatively, you can use the dmesg
command to view the kernel log, which includes messages about the devices detected by the system during boot. To use dmesg
, you can run the following command:
dmesg | grep -i 'cdrom\|dvd\|bluray'
This will output lines from the kernel log that contain the strings "cdrom", "dvd", or "bluray", which may indicate the presence of a DVD, CD-ROM, or Blu-ray drive on the system.