Listing devices on Linux

https://www.lifewire.com/how-to-use-linux-to-find-the-names-of-the-devices-on-your-computer-4078068

  • ls – list files in the file system
  • lsblk – list the block devices (i.e. drives)
    • mount| grep /dev/sd – lists mounted partitions
  • lspci – list the pci devices
    • lspci -vv
    • lspci -vvv
  • lsusb – list the USB devices
  • lsdev – list all the devices

List serial ports

https://www.cyberciti.biz/faq/find-out-linux-serial-ports-with-setserial/

Linux uses ttySx for a serial port device name. For example, COM1 (DOS/Windows name) is ttyS0, COM2 is ttyS1 and so on.

  • dmesg |grep tty
  • setserial -g /dev/ttyS[0123]