I’m trying to reposition the text-cursor to top left corner of the console each frame, so the resulted square rendered at the same position I found that this is possible in windows by including <windows.h>: How can I do that in Ubuntu? Answer [update] Oops, sorry, I didn’t notice the “[C]” tag and my answer was only referring to shell