Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac Command Line - List Available Serial Ports?

on my Mac, i currently have the available serial ports:

  • /dev/tty.usbserial-A700dYoR
  • /dev/cu.usbserial-A700dYoR
  • /dev/tty.Bluetooth-PDA-Sync
  • /dev/cu.Bluetooth-PDA-Sync
  • /dev/tty.Bluetooth-Modem
  • /dev/cu.Bluetooth-Modem

is it possible to retrieve a list of the available serial ports of the computer from the command line (terminal)?

like image 703
Chunky Chunk Avatar asked Sep 28 '10 17:09

Chunky Chunk


People also ask

How do I find netstat on Mac?

To run netstat and see detailed data about your Mac's network, open a new Terminal window, type netstat, and press Enter. Limit netstat's output with flags and options. To see netstat's available options, type man netstat at the command prompt.

How do I check if a port is occupied on a Mac?

You can use lsof -i:3000 . That is "List Open Files". This gives you a list of the processes and which files and ports they use.


1 Answers

ah... it is much easier than i though.

ls /dev/tty.* ls /dev/cu.* 

will list

  • /dev/tty.usbserial-A700dYoR
  • /dev/tty.Bluetooth-PDA-Sync
  • /dev/tty.Bluetooth-Modem
  • /dev/cu.usbserial-A700dYoR
  • /dev/cu.Bluetooth-PDA-Sync
  • /dev/cu.Bluetooth-Modem
like image 191
Chunky Chunk Avatar answered Oct 09 '22 03:10

Chunky Chunk