Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6956409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:51:57+00:00 2026-05-27T14:51:57+00:00

ls -la /dev/tty shows the output: crw-rw-rw- 1 root tty 5, 0 Dec 14

  • 0

ls -la /dev/tty shows the output:

crw-rw-rw- 1 root tty 5, 0 Dec 14 22:21 /dev/tty

What does c at the beginning mean? When I do something like pwd > /dev/tty it prints to the stdout. What does the file /dev/tty contain?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:51:58+00:00Added an answer on May 27, 2026 at 2:51 pm

    The ‘c’ means it’s a character device. tty is a special file representing the ‘controlling terminal’ for the current process.

    Character Devices

    Unix supports ‘device files’, which aren’t really files at all, but file-like access points to hardware devices.
    A ‘character’ device is one which is interfaced byte-by-byte (as opposed to buffered IO).

    TTY

    /dev/tty is a special file, representing the terminal for the current process. So, when you echo 1 > /dev/tty, your message (‘1’) will appear on your screen. Likewise, when you cat /dev/tty, your subsequent input gets duplicated (until you press Ctrl-C).

    /dev/tty doesn’t ‘contain’ anything as such, but you can read from it and write to it (for what it’s worth). I can’t think of a good use for it, but there are similar files which are very useful for simple IO operations (e.g. /dev/ttyS0 is normally your serial port)

    This quote is from http://tldp.org/HOWTO/Text-Terminal-HOWTO-7.html#ss7.3 :

    /dev/tty stands for the controlling terminal (if any) for the current
    process. To find out which tty’s are attached to which processes use
    the “ps -a” command at the shell prompt (command line). Look at the
    “tty” column. For the shell process you’re in, /dev/tty is the
    terminal you are now using. Type “tty” at the shell prompt to see what
    it is (see manual pg. tty(1)). /dev/tty is something like a link to
    the actually terminal device name with some additional features for
    C-programmers: see the manual page tty(4).

    Here is the man page: http://linux.die.net/man/4/tty

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Each serial device shows up twice in /dev , once as a tty.* and
i want to list files from dev end at tty bettwen 15 and 24...should
Still an iphone dev starter but trying. I would like to have the user
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
When I do excel_mapping = YAML.load_file(#{Rails.root}/config/FdfToExcelMapping.yml) in dev environment the result is a hash
Our dev server was recently upgraded to PHP v5.2.13. With that upgrade we have
My dev machine is 32 bit, and my target is a 64 bit web
I have a dev server in our office that is behind the firewall. The
As a dev I normally group my explorer detail view by file type. This
After having had a dev PC HD corrupt, I'm considering the idea of making

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.