ncurses (New curses) is a free library providing an API for the development of user interfaces with drop-down menus, using the characters and colors of a semi-graphical mode. Not only is this type of user interface designed independently of the terminal, but it speeds up screen refresh, thereby reducing the latency typically experienced by remote shell users (Read Text User Interface, TUI).
We face ncurses library mainly in C++ and C. Many programming languages today include a link to this library: Python, Ruby, PHP, JavaScript, Perl and so on.
The first semi-graphic library, curses, was programmed around 1980 at the University of Berkeley for the port of the game Rogue to Unix BSD. It used the termcap library, itself developed for the vi line editor.
---
Given the reception given to BSD curses, Bell Labs decided to include it in version 2 of Unix System V, with some improvements and using terminfo, a faster access database, instead of termcap; however, given AT&T’s restrictive policy on rights protection, this improved version of curses was less successful than the first. Around 1982, Pavel Curtis began to develop a free clone, pcurses, which was maintained by several users until 1986. Ncurses is a free simulation of the classic 4.4BSD implementation of curses, whose evolution is now stopped.

In the early 1990s, Zeyd Ben Halim and Eric Raymond continued the development of pcurses and called it ncurses, which is now predominantly in use. Thomas Dickey joined the project in 1995 and has been the lead developer since 1996. This is the official website of Thomas Dickey for ncurses project:
1 2 | https://invisible-island.net/ncurses/ncurses.faq.html https://github.com/ThomasDickey/ncurses-snapshots |
There are many programs which use ncurses. GNU Screen and w3m, use only the termcap interface and perform screen management themselves. Lynx, GNU Midnight Commander and YaST, use the curses programming interface.
This is an example of Hello World program in C++ using ncurses:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #include using namespace std; int main(int argc, char ** argv) { // init screen and sets up screen initscr(); // print to screen printw("Hello World"); // refreshes the screen refresh(); // pause getch(); // ends ncurses endwin(); return 0; } |
You can read these two articles which are related to ncurses:
- List of Command Line Music Players For Mac, Linux
- How To Build Colorful Command Line TUI For Shell Scripts