Linked Questions
20 questions linked to/from Linux: Difference between /dev/console, /dev/tty and /dev/tty0
35
votes
3
answers
72k
views
Terminal vs bash? [duplicate]
I'm on a Mac but I think this is generally Unix-applicable.
I'm in the process of learning shell scripting and there's something I seem to be missing. When I'm in the ordinary terminal, I can use ...
27
votes
2
answers
21k
views
What is `/dev/console` used for?
From this answer to Linux: Difference between /dev/console , /dev/tty and /dev/tty0
From the
documentation:
/dev/tty Current TTY device
/dev/console System console
/dev/tty0 Current ...
8
votes
2
answers
13k
views
How Linux uses /dev/tty and /dev/tty0
I can see the difference between /dev/tty and /dev/tty0 by testing the provided method from this question. But I really wonder about the practical usage of those devices (like situations they will be ...
6
votes
3
answers
5k
views
Are ASCII escape sequences and control characters pairings part of a standard?
There are common pairings of escape sequences to ASCII control characters, such as Ctrl-C and Ctrl-Z to ETX and SUB, respectively.
On the Wikipedia Control Codes page, there are most pairings, but no ...
7
votes
3
answers
3k
views
What are TTYs >12 used for?
Related to TTY numbers, it looks like there are 64 TTYs (find /dev -name 'tty[0-9]*' | cut -c 9- | sort -n | tail -n 1 and documentation). tty0 is the current virtual console, Ctrl+Meta+F1 reports ...
17
votes
1
answer
3k
views
Does Posix require any devices?
Does Posix require any devices? For example, /dev/urandom, /dev/zero or /dev/null?
I suspect not because of non-*nix OSes, but wanted to ask for completeness.
9
votes
1
answer
14k
views
look up the device from its tty file?
Here is from my Ubuntu
$ ls /dev/*tty*
/dev/tty /dev/tty17 /dev/tty26 /dev/tty35 /dev/tty44 /dev/tty53 /dev/tty62 /dev/ttyS12 /dev/ttyS21 /dev/ttyS30
/dev/tty0 /dev/tty18 /dev/tty27 ...
6
votes
3
answers
4k
views
Make systemd debug shell usable again
Specifying systemd.debug-shell=1 as kernel parameter kind of works: I can switch via Alt+F9 to a shell when systemd boot hangs.
But this shell is quite impossible because an animated
[ *** ] A ...
7
votes
1
answer
8k
views
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
...
4
votes
2
answers
905
views
Is a virtual console running as a process and implemented based on pseudoterminal?
Linux has 7 virtual consoles, which correspond to 7 device files /dev/tty[n].
Is a virtual console running as a process, just like a terminal emulator? (I am not sure. It seems a virtual console is ...
0
votes
2
answers
3k
views
How can I configure a running kernel to output dmesg info directly to the tty, without involving any userspace programs?
There are a large variety of questions floating around the 'net from people who want to watch the output of dmesg in real time. All the suggestions and answers involve using dmesg -w, tail, journalctl ...
5
votes
3
answers
2k
views
/dev/console points to tty0?
I've been trying to understand the /dev/console device, but there are a few things I'm not clear on:
What is the purpose of this device? From what I can gather it's just a place for the kernel to ...
3
votes
1
answer
2k
views
Determine which tty is in the "foreground" / "currently displayed"?
In linux I can use the key combinations Alt-Ctrl-F1,Alt-Ctrl-F2... to switch to different tty1 as I could use man chvt.
using the command tty I also get displayed the teletype/linux virtual console I ...
2
votes
1
answer
1k
views
Why " >/dev/console" for remote beep (echo-command)
I've learned that this command:
echo -e "\a"
triggers a beep on the local system, whereas this command:
echo -e "\a" >/dev/console
triggers a beep on a remote system.
Why is this? What is the &...
2
votes
2
answers
1k
views
Does systemd not protect processes against acquiring a controlling terminal?
man 7 daemon
When a traditional SysV daemon starts, it should execute the following steps as part of the initialization. Note that these steps are
unnecessary for new-style daemons (see ...