16

I want to use certain operations (like clearing the screen etc.) in C programs in Linux platform and I am informed that it can be done including curses.h header-file. But this doesn't seem to be available along with gcc package.

Please, tell me how can I install it?

2
  • The answers are going to be different, depending on the Linux distribution. You haven't said which one you're using. Commented Aug 16, 2013 at 15:48
  • @Daniel Kamil Kozar...ubuntu 12.10 Commented Aug 16, 2013 at 15:55

3 Answers 3

38

Try this:

sudo apt-get install libncurses5-dev
4
  • How can I get the manual for this header-file(in terminal)? @Linuxios Commented Aug 16, 2013 at 16:04
  • "man curses" is not working.It is showing "No manual entry for curses". Commented Aug 16, 2013 at 16:19
  • Can you tell me the function that clears the screen of terminal? Commented Aug 16, 2013 at 16:27
  • Still working for Ubuntu 20.04LTS
    – Steve Lau
    Commented Mar 12, 2022 at 6:25
9

On RHEL / Fedora / CentOS Linux, type the following yum command at a shell prompt as root user:

yum install ncurses-devel ncurses
6

On Debian/Ubuntu/Deepin,use the following command:

sudo apt install libncurses5-dev

man document:

sudo apt install ncurses-doc

then: man ncurses

Not the answer you're looking for? Browse other questions tagged or ask your own question.