Skip to main content

Questions tagged [tty]

tty is a Unix command that prints on standard output file name connected to standard input. The program's name comes from teletypewriter, abbreviated "TTY".

Filter by
Sorted by
Tagged with
36 votes
2 answers
42k views

Why are there so many /dev/tty in Linux?

In ubuntu 10.04, if I check under /dev, there are more than 50 ttys. tty0, tty1, tty2.... I understand tty is a character device for console input/output. but why is there so many of them? is it ...
daehee's user avatar
  • 475
31 votes
6 answers
56k views

How to reset a broken TTY?

My Slackware TTY can be broken easily by running: cat some_binary_file After the command, the entire TTY will no longer display readable characters but still responds to keyboard events. Even if I ...
Howard's user avatar
  • 2,306
31 votes
3 answers
14k views

How do I get systemctl to print in color when being interacted with from a non-tty?

When I run a command like this: # systemctl status plexmediaserver I get nicely colored output. But when I run the following command: # watch -n300 --color systemctl status plexmediaserver Is ...
cronburg's user avatar
  • 716
29 votes
5 answers
27k views

TTY with 256 colors?

With URxvt and xterm it is possible to use a virtual terminal supporting 256 colors instead of only eight. Since my Intel GMA graphics card is well-supported by the KMS framebuffer driver, I am ...
timn's user avatar
  • 926
27 votes
1 answer
19k views

How to simulate a shell without tty?

I'm facing trouble with a system which I'm maintaining via SSH. When I test commands which require a TTY they work, probably because of the SSH session. Under some unclear circumstances there's no TTY ...
Kalle Richter's user avatar
22 votes
1 answer
40k views

How to change virtual ttys in Linux and OpenBSD with console commands?

In Linux one presses Alt-F1, Alt-F2 etc to change virtual ttys. In OpenBSD one shall use Ctrl-Alt-F1 etc instead. Are there are console commands for these two operating systems that can be issued to ...
geek's user avatar
  • 10.2k
18 votes
4 answers
25k views

Is there a way to alter the colors used in TTY consoles on Linux?

By "alter colors", I mean something like change black from #000000 to #111111, and by "TTY console", I mean what you get when you do Ctrl+Alt+F1 from X11, not a terminal emulator like xterm or urxvt. ...
Austin Hyde's user avatar
  • 1,094
13 votes
3 answers
59k views

How to restart ttyusb*

I have two devices that are continuously feeding data through ttyUSB0 and ttyUSB1. I have php scripts that are using this data. The problem I am running into is that sometimes the feed just kind of ...
emilyk's user avatar
  • 251
12 votes
3 answers
9k views

How do I make Ubuntu start fbterm in the tty on startup?

When I was testing openSUSE about a week ago, I noticed that tty1 (yes, just tty1) had the openSUSE background. I want to do the same in Ubuntu. I found a way using fbsplash. I'm not too keen on that ...
biggles5107's user avatar
12 votes
1 answer
2k views

Show password characters when logging in to Linux

I am setting up a long-range wireless serial terminal (with a pair of XBees, if anyone is wondering) connected to my Linux box. It's going great, but sometimes a keystroke doesn't go through. This ...
Skylar Ittner's user avatar
11 votes
5 answers
5k views

less emulate a TTY to preserve piped color output

When you pipe something through less, the program usually discards color codes because it's not outputting to a TTY. So you have to add --color=always to the options for it to work. ls -l --color=...
goweon's user avatar
  • 1,753
11 votes
1 answer
22k views

Sending change virtual console command in PuTTY

I'm trying to use PuTTY to change the virtual console on Linux via the usual key commands - Alt + F1 or Ctrl + Alt + F1 etc. However this doesn't work. Switching TTY should be simple and is something ...
nemof's user avatar
  • 163
11 votes
1 answer
11k views

X on one monitor, a bare, tty terminal on another? (linux)

The graphics card on my computer has outputs for (at least) two separate monitors. I have one monitor that is high resolution, and I like using it for X (anything graphical). My other monitor, however,...
pepper's user avatar
  • 389
10 votes
6 answers
34k views

Linux: Copy/paste in TTY

I am looking for a way to copy and paste within a TTY. I only have a touchpad, and using it with gpm is a pain. The only possibility I can think of is to use "screen" but even after having remapped ...
timn's user avatar
  • 926
8 votes
2 answers
6k views

Can I login to multiple terminals with the same user safely on Linux?

By terminals I mean the ones you can switch to using Ctrl+Alt+F1-F6. I know I'm able to login multiple times but does this have any side-effects?
Henry Heikkinen's user avatar
8 votes
1 answer
6k views

Socat and rich terminals (with Ctrl+C/Ctrl+Z/Ctrl+D propagation)

socat - exec:'bash -li',pty,stderr,ctty -> bash: no job control in this shell What options should I use to get fully fledged shell as I get with ssh/sshd? I want to be able to connect the shell to ...
Vi.'s user avatar
  • 17.3k
8 votes
1 answer
16k views

/dev/tty: no such device or address - only in a script

I'm pulling my hair out over this. I've looked over all of the google results for /dev/tty : no such device or address, none of them apply to what I am doing / none of the solutions are successful. I ...
Brydon Gibson's user avatar
8 votes
2 answers
3k views

How can I switch tty on a Mac (equivalent of chvt in Linux)?

Is there a way to switch between different tty from a Mac terminal? This would be an equivalent to the chvt command on Linux.
DilithiumMatrix's user avatar
7 votes
3 answers
1k views

WSL - Trailing whitespaces being added to Bash code pasted into CMD WSL TTY per window size

I have a few Bash scripts on Windows and I sometimes copy them from Notepad++ into the WSL (CMD based) terminal emulator (TTY) to execute them. The problem: Trailing whitespaces (Green boxes in nano)...
user avatar
7 votes
1 answer
20k views

Redirect input from one terminal to another

I have sshed into a linux box and I'm using dvtm and bash (although I have also tried this with Gnu screen and bash). I have two terminals, current /dev/pts/29 and /dev/pts/130. I want to redirect ...
Niki Yoshiuchi's user avatar
7 votes
3 answers
13k views

Howto start an interactive script at ubuntu startup?

Based on Ubuntu core 12.04, I have prepared a bootable DVD. After booting (to console only), I can login as a user and start a script for installation of an embedded device: sudo install_script In ...
Carsten Scholtes's user avatar
7 votes
2 answers
15k views

unable to switch TTY in arch linux

So I'm moving away from Ubuntu into the realm of Arch Linux. In Ubuntu I was able to switch TTYs with ctrl+alt+F1/F2... and etc. In Arch when I attempt this, I'm merely dumped to a black screen ...
user avatar
6 votes
2 answers
19k views

Is there any way to open a program on a specific tty?

I have a PC with no mouse or keyboard, but it is connected to a monitor. I was wondering if is it possible to open a program remotely (like via SSH) in a specific tty (like tty1) so I would able to ...
Mids's user avatar
  • 87
6 votes
3 answers
2k views

Tab completion in zsh makes duplicate characters

when using tab completion in zsh, using ohmyzsh, in a relatively fresh arch install, the first two characters will duplicate themselves and become not deletable. For instance, I type yay -S terminato ,...
imaducklol's user avatar
6 votes
1 answer
3k views

How can I add more TTYs to Ubuntu 16.04?

The question is basically the title. I tried Ctr+Alt+F7 but nothing happens. I use all six of my currently available virtual terminals and need more. How can I add more TTYs?
Tty Sessions OP's user avatar
6 votes
1 answer
2k views

No /dev/tty in cygwin

I installed ammonite and got (Scala 2.11.7 Java 1.8.0_45) bash: /dev/tty: No such device or address bash: /dev/tty: No such device or address Exception in thread "main" java.lang.RuntimeException: ...
Valentin Tihomirov's user avatar
6 votes
2 answers
4k views

Redirect physical keyboard input to SSH

I'm having a raspberry pi running debian linux and I have an RFID reader connected to it. The RFID reader behaves like a keyboard. Every time I scan a tag it types then number of the tag and then ...
dimme's user avatar
  • 195
5 votes
2 answers
2k views

How to enter tty1-6 in Linux in virtual-box in Linux host

I installed a virtual box in my Ubuntu host, and then installed another Ubuntu on my virtual box. Everything is alright except when I try to enter tty1-6 in the virtual one, I just enter tty1-6 in my ...
user avatar
5 votes
4 answers
29k views

How to use sudo from within Windows GUI clients bypassing tty

I need to copy files via ssh but I am getting permission denied. How can I log as a root by windows clients such us FileZilla/WinSCP? I try execute command: sudo su, but I am getting error: You ...
Codium's user avatar
  • 181
5 votes
3 answers
2k views

Tweaking Mac OS X full-screen console mode

When using the full-screen console mode in Mac OS X accessed by entering the username '>console', I would like to use a different keyboard layout and would like support for colors. The terminal seems ...
dma's user avatar
  • 153
5 votes
1 answer
3k views

Output in a virtual console (tty1) ridiculously slow; possible graphics acceleration issue

Some time ago on an older computer running Ubuntu I noticed the output on a virtual console (e.g. tty1) is slow. It wasn't an issue there and barely even noticeable. But now on my new laptop with ...
Mealynn's user avatar
  • 51
5 votes
1 answer
1k views

How do I speed up my text console on Ubuntu 18.04?

I just installed 18.04 on a Dell T310 server, and I'm noticing that the text console is unusably slow when scrolling text. To add some numbers to this, invoking dmesg immediately after boot over an ...
Karu's user avatar
  • 4,762
5 votes
1 answer
5k views

How to get different terminals for dual monitor scheme without X

I have Ubuntu installed without X.org with two monitors(single card: vga and dvi) Login shell is cloned for both monitors. I there any way to have different shells(tty) for these monitors?
Andrew's user avatar
  • 151
5 votes
5 answers
327 views

How to prevent a process from executing in bash

The following command has been entered: sleep 12h; nuke-russia It was entered on one of the Debian's ttys. I would like to cancel the sleep without nuking anything. I don't want the nuke command to ...
Mark's user avatar
  • 333
4 votes
2 answers
7k views

Silencing Linux console output

I installed a minimalist distribution for my mom to use, it uses rungetty to autologin and an init script that just does 'startx'. Everything works great but when she goes to shutdown, it drops back ...
user avatar
4 votes
1 answer
7k views

how to run openssl dhparam quietly?

I'm writing an install script including generating a Diffie Hellman file with the command openssl dhparam -out /tmp/dhparam.pem 2048 As it can take some time and it isn't required for the following ...
maxlath's user avatar
  • 143
4 votes
1 answer
5k views

Is there a limit to virtual console TTY's in Linux Based OS'es

The TeleType Consoles in linux can be switched by Ctrl + Alt + F(#TTY). How many such TTY's can linux have at a time? Is there even a limit?
Amith KK's user avatar
  • 205
4 votes
2 answers
4k views

Displaying text on /dev/tty1

I have a server laptop sitting around at home which is a pretty bland server, on which I generally leave the lid open and there is a login prompt always displayed. However, I'd love to be able to ...
EricR's user avatar
  • 493
4 votes
3 answers
2k views

How to get tty shell working directory?

Is it possible to get working directory of any of my tty shells? So\ get working directory of any shell in /dev/ttys??? belonging to me. I use OS X.
tig's user avatar
  • 4,754
4 votes
1 answer
4k views

Run startx over SSH

This question has been asked several times, but the solutions I've found always solve the problem in a different way. On the remote machine (the one on which I want to run startx), I have already ...
lmat - Reinstate Monica's user avatar
4 votes
0 answers
659 views

How to remove tty[7-63]?

I have an embedded system, a beaglebone black to be specific. This SBC runs Debian wheezy 7.4, and a custom 3.8.x kernel. Patched for this hardware. Anyway, the title pretty much says it all. I can ...
William Hermans's user avatar
4 votes
1 answer
2k views

Is it possible to use uvesafb with nvidia proproetary drivers?

I would like to have high-resolution console with NVidia proprietary driver. To accomplish that I'm trying to use uvesafb. So what I've done: yaourt -S v86d /etc/modprobe.d/uvesafb.conf: ...
pashazz's user avatar
  • 53
3 votes
1 answer
2k views

Can `tmux` get the display the current tty in window names?

For example, in tmux, I name a window 'test', but how can I add the tty of the current terminal (assuming that is pts/15) to the end of window name with the tty command. Then it becomes test pts/15. ...
zhenguoli's user avatar
  • 133
3 votes
1 answer
2k views

why most linux distro have 7 tty and make x window to tty 7 as default? [closed]

I know tty can be reduced but I don't know why Most linux distro have 7 tty(s) as a default setting. Why choose 7 instead of 6 or 3? I had never use all 7 tty at the same time. And, The reason for ...
RichardWong's user avatar
3 votes
2 answers
5k views

Change Keyboard Layout in TTY Permanently

How can I change the keyboard layout in the TTY aka text mode reached through the combinations Ctrl+Alt+F1 through F6 permanently? I tried sudo echo 'KEYMAP=de' > /etc/conf.d/keymap and echo '...
Alex's user avatar
  • 306
3 votes
3 answers
2k views

Linux: Start tmux inside fbterm on login

So here's what I want: On every tty login, fbterm starts. It gives me a better resolution than the linux console, has working UTF-8 support (I'm sure it's entirely my fault that the linux console ...
Lucas Werkmeister's user avatar
3 votes
1 answer
3k views

How to resize tmux panes inside tty

I'm not sure if I used the right term, but by "tty" I understand the console that you can switch to using ctrl+alt+f2 key combination. echo $TERM points to linux. Anyway, when I enter the tmux mode I ...
Mikhail Morfikov's user avatar
3 votes
1 answer
2k views

User can't login on tty1 but can on other tty's

Last weekend I installed Kali Linux (4.13.0-kali1-amd64). Now after installation and creating a new user (because I don't want to use root) I can login on tty2 to tty6 (via ALT+CTRL+F*), but I can't ...
Xinq's user avatar
  • 31
3 votes
1 answer
2k views

different ttys on different monitors

I am running a few un*ces and I have now grasped the power of using different ttys (Ctrl+alt+F(x)). Yesterday, I attached a second monitor. I was able to configure x to extend my desktop, and I became ...
averagejoey2000's user avatar
3 votes
1 answer
2k views

How to cat <<'EOF' arbitrary text data from clipboard

I want to paste some text into a terminal and save it to a file without using an editor, but just 'cat'. But too long lines or tabs in text make it impossible to do so with a simple command like "cat >...
basin's user avatar
  • 514