Questions tagged [stty]

"stty" command sets the options of terminal (tty).

The stty command sets certain I/O options for the device that is the current standard input. This command writes output to the device that is the current standard output.

Source: man stty

107 questions
21
votes
3 answers

How are terminal length and width forwarded over SSH and telnet?

When I view the length and width of my terminal emulator with stty size then it is 271 characters long and 71 lines tall. When I log into another server over SSH and execute stty size, then it is also 271 characters long and 71 lines tall. I can…
Martin
  • 7,284
  • 40
  • 125
  • 208
13
votes
1 answer

Keep bash input on top line of screen

I'd like to keep the bash command prompt input at the top of the screen so that outputs from older commands are pushed downwards rather than up. How can I achieve this?
Tom Price
  • 143
  • 1
  • 7
12
votes
1 answer

Why are two ^D presses necessary to exit `cat`?

Let's run cat and then type a then ^D - you will see that cat did not exit. Compare it with cat + a + Enter + ^D - now cat did exit. So, why two ^D presses are necessary to exit cat in the first case and only one ^D in second case?
Igor Liferenko
  • 703
  • 4
  • 16
10
votes
4 answers

STTY: How can I set rows/columns to its supported maximum?

I would like some 83(cols)x40(rows) size on my TTY, so: xubuntu@xubuntu:~$ stty size 30 90 xubuntu@xubuntu:~$ stty cols 83 rows 40 stty: standard input: Invalid argument xubuntu@xubuntu:~$ stty size 30 83 As can be seen in my example, cols=40 is…
Sopalajo de Arrierez
  • 6,281
  • 21
  • 60
  • 98
10
votes
2 answers

echo test | stty -echo -> stty: standard input: Inappropriate ioctl for device

I was playing with a perl script that takes user input with the following: system( qw( stty -echo ) ); $? == 0 or die "Error unable to disable character printing.\n"; print "$prompt: "; my $input = ; I thought I would be able to pipe in a…
user2219808
  • 201
  • 1
  • 2
  • 4
7
votes
1 answer

How to resize TTY console width?

I'm on FreeBSD. I want to set console width (just console, not ssh or telnet). I used this command: stty cols 132 Is this work for just console or worked for all of the connections (console, ssh and telnet)?
F.M
  • 378
  • 1
  • 3
  • 16
7
votes
2 answers

What is the equivalent of "stty -echo" for zsh?

I can hide what is written in a terminal with bash with stty -echo This is however not working for zsh: running this command does not change the output of stty -a What is the equivalent command of stty -echo for zsh?
user123456
  • 4,758
  • 11
  • 52
  • 78
7
votes
2 answers

Understanding Return, Enter, and stty icrlf

In Ubuntu/gnome-terminal, if I run: $ stty -icrnl Then launch the GHC interactive environment (a Haskell console): $ ghci Then pressing Return does not submit the line; however, Enter does. However, with: $ stty icrnl Both Return and Enter submit…
Matt R
  • 375
  • 4
  • 10
7
votes
1 answer

How to have type-ahead apply to bash history search (Ctrl-R)?

Context Typeahead in bash: good When a bash shell is busy (initializing, running a command), one can type before the next prompt appears. If the shell has launched a program, that program will capture the keys, but if no program is run or if the…
7
votes
1 answer

Sending serial commands with echo vs screen session

I have a small LED matrix controlled by a display driver that accepts serial commands to update the display. I'm successfully controlling it via node with the node serial package, however I'd like to be able to update it with echo so that I can…
MikeBman
  • 161
  • 1
  • 2
  • 7
6
votes
3 answers

Echoed escape sequences doesn't interpreted in Linux tty

Prerequisites The Linux virtual terminal (tty) is an emulation of VT102 - Virtual terminal subsystem source. The real VT100 (nearly the same as VT102) has the following behavior (I suppose): In the LINE mode all typed characters are first…
MiniMax
  • 4,025
  • 1
  • 17
  • 32
6
votes
1 answer

How do you disable XON/OFF flow control?

I issued a stty -ixon command which enables XON/XOFF flow control. There is a stty -ixoff command but that enables the "sending of start/stop characters". So once XON/XOFF flow control is enabled, how do you disable it? Similarly, how do you disable…
StevieD
  • 855
  • 2
  • 10
  • 23
6
votes
1 answer

Why do the terminal attributes look different from outside the terminal?

If I open up a terminal (xfce4-terminal 0.6.3, but I doubt it matters) and I look at what terminal attributes are set (BASH is running in the terminal), $ stty -a speed 38400 baud; rows 24; columns 80; line = 0; intr = ^C; quit = ^\; erase = ^?;…
6
votes
2 answers

Why does the terminal echo keystrokes when commands are running?

I was recently running tail -f on a log file of a server that was running, trying to diagnose a bug, when I accidentally bumped the keyboard and typed some characters. They got mixed in with the output of the log, with no way to tell which was…
Elias Zamaria
  • 163
  • 1
  • 5
5
votes
1 answer

What does the "opost" stty flag do?

The documentation says the following: [-]opost postprocess output I don't understand what this means. I have tried to disable this flag to see what it does: stty -opost -F /dev/pts/0 And I have typed the ls command, and the result had the first…
user259241
  • 51
  • 1
  • 2
1
2 3 4 5 6 7 8