Linux / Unix: Find Out What tty I’m Using

by on September 14, 2011 · 0 comments· last updated at September 14, 2011

What is a tty under Linux / UNIX? How do I find out what tty I'm on?

TTY is nothing but computer terminal which act as a basic device for using a computer. Open a command-line terminal (select Applications > Accessories > Terminal). To display the file name of the terminal connected to standard input, enter:
$ tty
Sample outputs:

/dev/pts/0

You can also use the who command and w command to find out your own or other logged-in users tty:
$ who
$ w

Linux / UNIX / BSD / Apple OSX: What tty I'm using?

Linux / UNIX / BSD / Apple OSX: What tty I'm using?


There are different types of text terminals:

  1. Dumb terminals
  2. Text terminals
  3. Graphic GUI Capabilities of text terminals

You can also view the manual page on tty using the following command:
$ man 4 tty
$ man pts
$ man tty
$ man who
$ man w



You should follow me on twitter here or grab rss feed to keep track of new changes.

Featured Articles:

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <kbd> <blockquote> <pre> <a href="" title="">

Tagged as: , , , , , , , , , , , , ,

Previous Faq:

Next Faq: