Questions tagged [tty]

A representation of a device that asynchronously transmits and receives serial data.

A TTY is a character device provided by the kernel that has certain configurable options such as baud rate, flow control, and parity. These options were necessary for the operation of early computer terminals and are still necessary for certain types of hardware (such as an RS-232 port or a USB-to-serial converter).

Because early computer terminals were represented as TTY devices, Unix-like operating systems usually use a TTY device as a primary way of communicating with the user. Shells typically run inside of terminal emulators, which are presented to the kernel and to userspace programs as a TTY (possibly via a P(seudo)TY interface); the stdin, stdout, and stderr of the shell and the programs it runs are all run through the TTY/PTY device.

Questions with this tag should relate in some way to a program's interaction with a PTY or TTY device, or to a physical TTY device or its drivers.

Further reading:

953 questions
32
votes
11 answers

How to stop cursor from blinking

How do I make the cursor stop blinking when in a TTY? (or anywhere else). BONUS Points for one universal setting that stops the cursor blinking almost everywhere.
Stefan
  • 25,300
21
votes
6 answers

Why are my virtual consoles completely blank?

When I go from my graphical session to a virtual console by Ctrl + Alt + F i (with i in 1 - 7 and 9-12) I see a completely black screen. Only on F8 I see the GUI. Not even a blinking coursor on the others. When I enter anything, I can't see…
Martin Thoma
  • 2,842
7
votes
1 answer

tty - dual monitors

I have a dual monitor setup running TTY only. The primary monitor is the actual "laptop", and the second monitor (Lilliput um-70) is connected through USB 2.0, using udl driver. Everything is working fine, except for one thing, whenever I change…
7
votes
1 answer

Some confused concept: ptmx and tty

All the following commands run in my debian terminal. ls /dev |grep ptmx /dev/ptmx ls /dev/pts 0 1 ptmx What is the difference between /dev/ptmx and /dev/pts/ptmx? ls /dev/tty* |sort /dev/tty /dev/tty0 /dev/tty1 /dev/tty10 Is there a…
scrapy
  • 333
4
votes
1 answer

What is tty within Linux?

My understanding of tty is is that its means "teletype writers" from the older days, where people had to get teletype writers in order to receive and input data into virtual terminals, my questions are: What does tty represent in Linux? What is tty…
programmer
  • 1,017
4
votes
2 answers

How to interpret all fields of `utmpdump /var/log/utmp`

I'd like to monitor logged in sessions, include how they logged in (physical console or SSH), and how long that session has existed for. It seems like utmpdump /var/log/utmp has that information, but I can find't the documentation that explains all…
3
votes
3 answers

How to capture output that's not to stdout or stderr (direct to tty) in QNX?

I have a utility foo that I want to grep output from, redirect, and otherwise do all the normal text manipulation stuff. But alas! Look at what it does... $ foo bar $ foo > /dev/null bar $ foo 2> /dev/null bar $ foo | grep abc bar $ foo 2| grep…
Aaron
  • 187
3
votes
1 answer

Optimal way to trace back TTY session that locks a resource?

Say you have plenty of interactive shells being run under same user id, like lots of screen or tmux (or both) "tabs". You tried unmount'ing a device and realised you couldn't since one of those shell sessions had its current directory changed there.…
poige
  • 6,231
3
votes
1 answer

How can I live-change the TTY rows and columns?

This is a question about Linux running on a Compulab device named Utilite Pro, but I think it is worth the price to ask this question here to get it solved for any platform (if possible). I use to work with ConSpy, a wonderful remote control…
2
votes
1 answer

How to make bash work with a TTY?

bash works with STDIN, STDOUT and STDERR. When xterm is opened, it allocates the pseudo tty. Then xterm forks child process and STDIN, STDOUT, STDERR are tied to slave_fd via dup2 and exec is called with bash. This is good. But how to make bash work…
2
votes
2 answers

How to open a terminal with no bash or any other processes running

1) I want to open a terminal for input/output of different processes that are already running. When I open a new terminal, bash is automatically executed and I can't get the terminal stdin, as it is already taken by bash. I want to run a terminal…
AndresR
  • 241
1
vote
2 answers

How can I find all the files whose name starts with "tty" in the /dev directory with all the file informations?

How do I find all the files whose name starts with tty in the /dev directory?
0
votes
2 answers

Why "No such device or address" when open /dev/tty in the first process?

Given that a simple program, as following: #include #include #include int main(int argc, char **argv) { int fd = -1; if (access("/dev/tty", F_OK) == 0) { fd = open("/dev/tty", O_RDWR); if (fd ==…
Li-Guangda
  • 257
  • 2
  • 3
  • 11
0
votes
0 answers

Print Something Before Login

In some distribution installers like Artix Linux Base or Manjaro Linux Architecture installers print a message before the login message. I want to do the same thing. How can I do the same for Linux and TTY? Please don't mark as duplicate and don't…
0
votes
0 answers

tty1 stuck on showing systemd instead of login prompt

I was booting Debian 10.4, and it worked fine. Now I have found out, that tty1 is hanging on showing systemd and doesn't move to login prompt. ttys 2-7 work like normal. systemctl enable getty@tty1.service didn't work. Is it a bug or a feature? If…
1
2