Jailkit: Fix “Error opening terminal: unknown.” by using nano

Warning: This page is a part of an archive now and will be removed in the future.

Generally, if you install Jailkit you can init “editors” to have several editors available in your jail as you also do in your operating system. By using nano or pico it could be possible to running into an error by trying to use them. The error message could be something like this:
Error opening terminal: unknown.
The problem here is a missing environment so that the editor doesn’t know which environment to use.

Fixing this bug is really easy. You just need to edit the file /etc/jk_chrootsh.ini and add a default environment. So just add the following lines:

Source Code

  1. [DEFAULT]
  2. env = TERM, PATH
However, if you retry using nano or pico the error message is still the same. What you need to do is reinit the editors. Assuming the jail is located in /var/jail, the command would be:

jk_init -vf /var/jail editors

Make sure to use the -f in order to overwrite existing symbolic links and force a reinit.

After that you can use nano or pico errorless inside the jail.
About the Author
Ich bin Webentwickler in Stuttgart und administriere Server seit vielen Jahren. In diesem Blog erstelle ich hauptsächlich Tutorials für andere Webentwickler, Webdesigner und Serveradministratoren.
-------------------------------------------------------------------------------------------------------------------------------------
I’m a web developer in Stuttgart, Germany, and server administrator since many years. This blog mainly contains a tutorial set for other web developer, web designer and server administrators.

497 times read

Comments 0

There are not any items at the moment.

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.