Reputation: 10901
When a terminal or console is started a /dev/ttyX
file is created for that instance. From that given terminal, is it possible to detect through a command what is the ttyX
file being used?
Upvotes: 0
Views: 137
Reputation: 77177
You want ttyname(3)
, which is POSIX-standard.
Upvotes: 2