What does “stty raw -echo” do on OS X

Firstly, the dash means “disable” a setting. So this enables echoing:

stty echo

This disables it:

stty -echo

When you disable it, your typing is not echoed back to you, which is why it seems as if the terminal is hanging. Try stty -echo then type ls and press return – you will still see the output of ls.

The raw setting means that the input and output is not processed, just sent straight through. Processing can be things like ignoring certain characters, translating characters into other characters, allowing interrupt signals etc. So with stty raw you can’t hit Ctrl-C to end a process, for example.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)