How to properly set environment variable TERM in CLion
问题 Using CLion on OSX, I'm creating a simple console app in which I want to do a system("clear") . When I'm running the app in the OSX terminal, it works without issue. When I run it using the CLion terminal, the system("clear") fails with message : TERM environment variable not set. I first tried to manually set it in my cmakelists.txt file without success by doing set(ENV{TERM} "xterm-256color") I then tried to manually set it (followed by full restart) in CLion settings for both Console and