Skip to main content
3 events
when toggle format what by license comment
Feb 23, 2022 at 21:36 comment added waltinator The TERM environment variable is used as a key into a database of terminal characteristics (cursor movement, character colors, magic "escape" sequences, ...). It doesn't change when one becomes root - it's the same terminal (terminal emulator). In the old days, when serial terminals each had their own set of magic characters, and magic behaviors, TERM was more useful. If one subverts TERM, all you get is a poorly configured glass keypunch. Try TERM=something sudo echo \$TERM.
Feb 23, 2022 at 18:43 comment added Augustine Calvino yes, as noted in my edit, I realized that, but even with switching to a sudo shell, the value of TERM persists. I have read through the sudoers man page, and in fact linked it in my edit, and this question exists because what i see doesn't seem to match what is described.
Feb 23, 2022 at 13:32 history answered waltinator CC BY-SA 4.0