Linked Questions

26
votes
3answers
53k 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 ...
12
votes
2answers
2k 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
2answers
7k 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
3answers
947 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 ...
4
votes
3answers
733 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
1answer
7k 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 ...
9
votes
1answer
1k 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.
3
votes
3answers
1k 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 ...
1
vote
1answer
1k 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/...
3
votes
2answers
295 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 ...
3
votes
1answer
121 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 ...
1
vote
2answers
215 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 ...
1
vote
1answer
114 views

Is `/dev/tty7` not directly accessible to Ubuntu users?

On Ubuntu, /dev/tty7 is the virtual console for desktop GUI. Is the only way to access /dev/tty7 to use chvt 7 or Ctrl+Alt+F7? Besides that, is /dev/tty7 not directly accessible to Ubuntu users, ...
0
votes
2answers
71 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 ...
0
votes
1answer
37 views

The console terminal demonstrate by who

When I issue the command who in a bash terminal: $ who me console 2018-11-09 07:13 me ttys000 2018-11-09 07:13 me ttys001 2018-11-09 07:13 The manual states: who - show who ...