DEV Community

Cover image for conio.h: No such file or directory in linux distribution?
Md. Maruf Sarker
Md. Maruf Sarker

Posted on

conio.h: No such file or directory in linux distribution?

If you face this types of error then you need to do add the conio.h header file into your computer.

So how can you do that?

answer: You need to follow some steps to configure this.
Step-1: Open your terminal and type

sudo apt-get update
Enter fullscreen mode Exit fullscreen mode

This will ask you to enter your password.
Step-2: Then you need to install a tool called nautilus. Because this will allow you to open your usr directory as open as administrator mode. So you need to type the following command

sudo apt-get install nautilus-admin
Enter fullscreen mode Exit fullscreen mode

Close your terminal.
Step-3: Open your file manager.Then open this path. You can find this option bottom left corner in your file manager.
Other Locations
Select Computer option
Select Computer
Then you can find root directories
Computer
Go to the usr directory and right click on the include directory then you will find a new option called Open as Administrator
Run as Administrator
Select this and this will ask you to enter your password. After that your file manager look like this one
Administrator Mode
Then open your terminal and type

cd Desktop/
touch conio.h
gedit conio.h
Enter fullscreen mode Exit fullscreen mode

Then open this link and open raw option
Select Raw
Then copy those lines of code and paste it in the opening text editor and save it.
Step-4: Copy this file(conio.h) and paste it here
Administrator Mode

Congratulations you completed all the steps. Now you are able to use conio.h header file in your c or cpp program.

Happy Coding

Subscribe my channel for get updated.

Top comments (0)