Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • The realized upon terminal most likely properly corresponds to TERM=iTerm.app or similar anyway. Commented Jun 17, 2020 at 9:16
  • @Thomas I don't specifically set the TERM for shells inside my tmux session. In this case, my EC2 just have that TERM setup that way, I didn't. If I understand your answer correctly, then I'll have to make sure the TERM variable in my EC2 is set to 'screen' or 'tmux'. Is there anyway to avoid this? I don't want to have to do this for all the machines I connect to and potentially mess up for other people who access these machines. Commented Jun 17, 2020 at 17:29
  • Ideally your TERM is set on the local machine and passed through to the remote machines. The only reason you should be setting TERM in a shell's initialization is for the (rare) case that you' re connecting via something that is unable to provide this information. Commented Jun 17, 2020 at 18:33
  • Right now, I don't specifically set TERM for my EC2 instances. From your answer, I understand that I should set the TERM on my laptop shell inside TMUX to be 'screen' or 'tmux'. And that's it. Is that correct? Commented Jun 19, 2020 at 18:44