Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make programs like nano/pico in linux

I was wondering how to make a program that can output to every line of the console and not just output a line to be tacked on to the bottom. How can I get control of the whole console like that so I could write console based apps?

like image 928
Ciph3rzer0 Avatar asked Oct 27 '25 08:10

Ciph3rzer0


1 Answers

You can use curses or similar library to make that kind of UI - check out GNU ncurses for example.

Wikipedia summarises ncurses nicely

ncurses is a programming library providing an API, allowing the programmer to write text user interfaces in a terminal-independent manner. It's a toolkit for developing "GUI-like" apps which run under a terminal emulator. It also optimizes screen changes, in order to reduce the latency experienced when using remote shells.

To get started, check out the NCURSES Programming HOWTO

like image 176
Paul Dixon Avatar answered Oct 30 '25 00:10

Paul Dixon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!