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]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.