When I am running Emacs from a terminal, how do I find out the tty device name from inside Emacs?
I first thought that it can be done with M-x shell-command RET tty RET, but this does not work: instead of, e.g., /dev/tty1, I get not a tty.
When I am running Emacs from a terminal, how do I find out the tty device name from inside Emacs?
I first thought that it can be done with M-x shell-command RET tty RET, but this does not work: instead of, e.g., /dev/tty1, I get not a tty.
(terminal-name) ; => "Macfunction by searching forterminalwithC-h f, I'm not sure if it is related, I don't know what's the meaning of "tty" and "terminal".M-x shell-command,M-x shellandM-x ansi-termdon't use the same "terminal" as emacs itself, so running thettycommand inside emacs won't work. When I run emacs from a terminal emulator ,(terminal-name) ; => "/dev/tty", but thettycommand outputs/dev/ttys000. – xuchunyang Jul 12 '19 at 16:50