list /dev/tty


5 posts
by Patrick222122 » Sat Jan 26, 2013 12:17 am
I entered the ls /dev/tty* command in to the terminal and got this list of devices.
/dev/tty /dev/tty19 /dev/tty3 /dev/tty40 /dev/tty51 /dev/tty62
/dev/tty0 /dev/tty2 /dev/tty30 /dev/tty41 /dev/tty52 /dev/tty63
/dev/tty1 /dev/tty20 /dev/tty31 /dev/tty42 /dev/tty53 /dev/tty7
/dev/tty10 /dev/tty21 /dev/tty32 /dev/tty43 /dev/tty54 /dev/tty8
/dev/tty11 /dev/tty22 /dev/tty33 /dev/tty44 /dev/tty55 /dev/tty9
/dev/tty12 /dev/tty23 /dev/tty34 /dev/tty45 /dev/tty56 /dev/ttyAMA0
/dev/tty13 /dev/tty24 /dev/tty35 /dev/tty46 /dev/tty57 /dev/ttyprintk
/dev/tty14 /dev/tty25 /dev/tty36 /dev/tty47 /dev/tty58
/dev/tty15 /dev/tty26 /dev/tty37 /dev/tty48 /dev/tty59
/dev/tty16 /dev/tty27 /dev/tty38 /dev/tty49 /dev/tty6
/dev/tty17 /dev/tty28 /dev/tty39 /dev/tty5 /dev/tty60
/dev/tty18 /dev/tty29 /dev/tty4 /dev/tty50 /dev/tty61

It is my understanding that the uart port and usb ports are defined as ?dev/tty devices. but I don't know which they are.
Posts: 80
Joined: Sun Dec 02, 2012 5:51 pm
by techpaul » Sat Jan 26, 2013 12:37 am
Try doing lsdev to show active devices

GPIO serial port is /dev/ttyAMA0

USB when added usually has a USB in its name
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/
Posts: 1509
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
by plugwash » Sun Jan 27, 2013 1:11 pm
tty is the terminal associated with the current process
tty1-tty63 are the virtual consoles (most systems only use the first 6 for text consoles though)
tty0 is the currently selected virtual console
ttyAMA0 is the built in UART on the Pi
ttyprintk is a driver that allows output of messages through the system used by printk messages from the kernel.

USB ports themselves don't have tty devices associated. However USB to serial adaptors and devices that contain or emulate USB to serial adaptors will have a tty device, Usually the name is ttyUSB<number> but some devices use other names. You don't seem to have any such devices in your system at the moment.
Forum Moderator
Forum Moderator
Posts: 2174
Joined: Wed Dec 28, 2011 11:45 pm
by talkeasy » Sat May 04, 2013 7:20 am
Sorry to resurect an old thread but sometimes it is useful to have information all in one place.

I have two usb deveices attached to my Pi running Raspbx, As seen here:

Code: Select all
root@raspbx:~# lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 413c:2107 Dell Computer Corp.
Bus 001 Device 005: ID 12d1:1446 Huawei Technologies Co., Ltd. E1552/E1800/E173 (HSPA modem)


However, when I look for them by searching

Code: Select all
ls -l /dev/tty*


No USB devices are displayed. How do I find them or make them visible?

Thanks.
Posts: 32
Joined: Sun Nov 04, 2012 10:57 pm
by plugwash » Sat May 04, 2013 8:13 am
IIRC for mobile broadband sticks you often need the package "USB-modeswitch" installed for them to work correctly.
Forum Moderator
Forum Moderator
Posts: 2174
Joined: Wed Dec 28, 2011 11:45 pm